mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 12:43:52 +00:00
add new CMAKE version support and fix CI test failure (#823)
This commit is contained in:
parent
0f040f78cb
commit
fbe1763675
18
.github/workflows/tests.yml
vendored
18
.github/workflows/tests.yml
vendored
@ -236,16 +236,28 @@ jobs:
|
|||||||
cmake-version: "3.20"
|
cmake-version: "3.20"
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
|
||||||
- name: Check CMake 3.21 (full)
|
- name: Check CMake 3.21
|
||||||
uses: ./.github/actions/quick_cmake
|
uses: ./.github/actions/quick_cmake
|
||||||
with:
|
with:
|
||||||
cmake-version: "3.21"
|
cmake-version: "3.21"
|
||||||
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
|
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
|
||||||
- name: Check CMake 3.22 (full)
|
- name: Check CMake 3.22
|
||||||
uses: ./.github/actions/quick_cmake
|
uses: ./.github/actions/quick_cmake
|
||||||
with:
|
with:
|
||||||
cmake-version: "3.22"
|
cmake-version: "3.22"
|
||||||
|
if: success() || failure()
|
||||||
|
|
||||||
|
- name: Check CMake 3.23 (full)
|
||||||
|
uses: ./.github/actions/quick_cmake
|
||||||
|
with:
|
||||||
|
cmake-version: "3.23"
|
||||||
|
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
|
||||||
|
if: success() || failure()
|
||||||
|
|
||||||
|
- name: Check CMake 3.24 (full)
|
||||||
|
uses: ./.github/actions/quick_cmake
|
||||||
|
with:
|
||||||
|
cmake-version: "3.24"
|
||||||
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
|
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
@ -6,10 +6,10 @@ cmake_minimum_required(VERSION 3.4)
|
|||||||
# of CMake. For most of the policies, the new version is better (hence the change).
|
# of CMake. For most of the policies, the new version is better (hence the change).
|
||||||
# We don't use the 3.4...3.21 syntax because of a bug in an older MSVC's
|
# We don't use the 3.4...3.21 syntax because of a bug in an older MSVC's
|
||||||
# built-in and modified CMake 3.11
|
# built-in and modified CMake 3.11
|
||||||
if(${CMAKE_VERSION} VERSION_LESS 3.22)
|
if(${CMAKE_VERSION} VERSION_LESS 3.24)
|
||||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||||
else()
|
else()
|
||||||
cmake_policy(VERSION 3.22)
|
cmake_policy(VERSION 3.24)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")
|
set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")
|
||||||
|
@ -4,7 +4,7 @@ if(CLI11_SANITIZERS)
|
|||||||
sanitizers
|
sanitizers
|
||||||
GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git
|
GIT_REPOSITORY https://github.com/arsenm/sanitizers-cmake.git
|
||||||
GIT_SHALLOW 1
|
GIT_SHALLOW 1
|
||||||
GIT_TAG 99e159e)
|
GIT_TAG a6748f4)
|
||||||
|
|
||||||
FetchContent_GetProperties(sanitizers)
|
FetchContent_GetProperties(sanitizers)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user