Commit fbe1763675cfe0f21c20aa95b658dc94bde6b8ac
Committed by
GitHub
1 parent
0f040f78
add new CMAKE version support and fix CI test failure (#823)
Showing
3 changed files
with
18 additions
and
6 deletions
.github/workflows/tests.yml
| @@ -236,16 +236,28 @@ jobs: | @@ -236,16 +236,28 @@ jobs: | ||
| 236 | cmake-version: "3.20" | 236 | cmake-version: "3.20" |
| 237 | if: success() || failure() | 237 | if: success() || failure() |
| 238 | 238 | ||
| 239 | - - name: Check CMake 3.21 (full) | 239 | + - name: Check CMake 3.21 |
| 240 | uses: ./.github/actions/quick_cmake | 240 | uses: ./.github/actions/quick_cmake |
| 241 | with: | 241 | with: |
| 242 | cmake-version: "3.21" | 242 | cmake-version: "3.21" |
| 243 | - args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON | ||
| 244 | if: success() || failure() | 243 | if: success() || failure() |
| 245 | 244 | ||
| 246 | - - name: Check CMake 3.22 (full) | 245 | + - name: Check CMake 3.22 |
| 247 | uses: ./.github/actions/quick_cmake | 246 | uses: ./.github/actions/quick_cmake |
| 248 | with: | 247 | with: |
| 249 | cmake-version: "3.22" | 248 | 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" | ||
| 250 | args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON | 262 | args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON |
| 251 | if: success() || failure() | 263 | if: success() || failure() |
CMakeLists.txt
| @@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.4) | @@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.4) | ||
| 6 | # of CMake. For most of the policies, the new version is better (hence the change). | 6 | # of CMake. For most of the policies, the new version is better (hence the change). |
| 7 | # We don't use the 3.4...3.21 syntax because of a bug in an older MSVC's | 7 | # We don't use the 3.4...3.21 syntax because of a bug in an older MSVC's |
| 8 | # built-in and modified CMake 3.11 | 8 | # built-in and modified CMake 3.11 |
| 9 | -if(${CMAKE_VERSION} VERSION_LESS 3.22) | 9 | +if(${CMAKE_VERSION} VERSION_LESS 3.24) |
| 10 | cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) | 10 | cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) |
| 11 | else() | 11 | else() |
| 12 | - cmake_policy(VERSION 3.22) | 12 | + cmake_policy(VERSION 3.24) |
| 13 | endif() | 13 | endif() |
| 14 | 14 | ||
| 15 | set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"") | 15 | set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"") |
tests/CMakeLists.txt
| @@ -4,7 +4,7 @@ if(CLI11_SANITIZERS) | @@ -4,7 +4,7 @@ if(CLI11_SANITIZERS) | ||
| 4 | sanitizers | 4 | sanitizers |
| 5 | GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git | 5 | GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git |
| 6 | GIT_SHALLOW 1 | 6 | GIT_SHALLOW 1 |
| 7 | - GIT_TAG 99e159e) | 7 | + GIT_TAG a6748f4) |
| 8 | 8 | ||
| 9 | FetchContent_GetProperties(sanitizers) | 9 | FetchContent_GetProperties(sanitizers) |
| 10 | 10 |