diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2ac12771..8d94fc91 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,14 +28,29 @@ jobs: runs-on: ubuntu-latest container: nvidia/cuda:10.2-devel-ubuntu18.04 steps: - - uses: actions/checkout@v1 - with: - submodules: true - - name: Add wget - run: apt-get update && apt-get install -y wget - - name: Install Modern CMake - run: wget -qO- "https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local - - name: Configure - run: cmake -S . -B build -DCLI11_CUDA_TESTS=ON - - name: Build - run: cmake --build build + - uses: actions/checkout@v1 + with: + submodules: true + - name: Add wget + run: apt-get update && apt-get install -y wget + - name: Install Modern CMake + run: wget -qO- "https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local + - name: Configure + run: cmake -S . -B build -DCLI11_CUDA_TESTS=ON + - name: Build + run: cmake --build build -j2 + + cmake34: + name: CMake 3.4 + runs-on: ubuntu-latest + # container: ubuntu:latest + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - name: Add CMake folder to path + run: mkdir -p cmake && echo "::add-path::$PWD/cmake/bin" + - name: Install Modern CMake + run: wget -qO- "https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C $PWD/cmake + - name: Configure + run: cmake --version && mkdir -p build && cd build && cmake .. diff --git a/CMakeLists.txt b/CMakeLists.txt index 67fca85b..749c7dbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,14 @@ cmake_minimum_required(VERSION 3.4) # Note: this is a header only library. If you have an older CMake than 3.4, # just add the CLI11/include directory and that's all you need to do. -# Make sure users don't get warnings on a tested (3.4 to 3.14) version +# Make sure users don't get warnings on a tested (3.4 to 3.16) version # of CMake. For most of the policies, the new version is better (hence the change). -# We don't use the 3.4...3.14 syntax because of a bug in a version of MSVC -if(${CMAKE_VERSION} VERSION_LESS 3.14) +# We don't use the 3.4...3.16 syntax because of a bug in an older MSVC's +# built-in and modified CMake 3.11 +if(${CMAKE_VERSION} VERSION_LESS 3.16) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) else() - cmake_policy(VERSION 3.14) + cmake_policy(VERSION 3.16) endif() set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")