Skip to content

Commit fbe1763

Browse files
authored
add new CMAKE version support and fix CI test failure (#823)
1 parent 0f040f7 commit fbe1763

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,28 @@ jobs:
236236
cmake-version: "3.20"
237237
if: success() || failure()
238238

239-
- name: Check CMake 3.21 (full)
239+
- name: Check CMake 3.21
240240
uses: ./.github/actions/quick_cmake
241241
with:
242242
cmake-version: "3.21"
243-
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
244243
if: success() || failure()
245244

246-
- name: Check CMake 3.22 (full)
245+
- name: Check CMake 3.22
247246
uses: ./.github/actions/quick_cmake
248247
with:
249248
cmake-version: "3.22"
249+
if: success() || failure()
250+
251+
- name: Check CMake 3.23 (full)
252+
uses: ./.github/actions/quick_cmake
253+
with:
254+
cmake-version: "3.23"
255+
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
256+
if: success() || failure()
257+
258+
- name: Check CMake 3.24 (full)
259+
uses: ./.github/actions/quick_cmake
260+
with:
261+
cmake-version: "3.24"
250262
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
251263
if: success() || failure()

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.4)
66
# of CMake. For most of the policies, the new version is better (hence the change).
77
# We don't use the 3.4...3.21 syntax because of a bug in an older MSVC's
88
# built-in and modified CMake 3.11
9-
if(${CMAKE_VERSION} VERSION_LESS 3.22)
9+
if(${CMAKE_VERSION} VERSION_LESS 3.24)
1010
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
1111
else()
12-
cmake_policy(VERSION 3.22)
12+
cmake_policy(VERSION 3.24)
1313
endif()
1414

1515
set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if(CLI11_SANITIZERS)
44
sanitizers
55
GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git
66
GIT_SHALLOW 1
7-
GIT_TAG 99e159e)
7+
GIT_TAG a6748f4)
88

99
FetchContent_GetProperties(sanitizers)
1010

0 commit comments

Comments
 (0)