diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 035f9dd9..2b88e55f 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -29,7 +29,7 @@ jobs: - name: Install Packages run: | - sudo apt-get install -y cmake make wget + sudo apt-get install -y wget - name: Install CUDA run: | @@ -41,6 +41,18 @@ jobs: echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV echo "CUDA_PATH=/usr/local/cuda-12.6" >> $GITHUB_ENV + - name: Install CMake + run: | + wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.sh + chmod +x cmake-3.24.0-linux-x86_64.sh + sudo mkdir -p /opt/cmake + sudo ./cmake-3.24.0-linux-x86_64.sh --prefix=/opt/cmake --skip-license + sudo rm -f /usr/local/bin/cmake + sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake + + - name: Verify CMake version + run: cmake --version + - name: Setup Boost run: | echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f9808f4..0be2896e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.24) project(boost_crypt VERSION 1.0.0 LANGUAGES CXX) @@ -18,12 +18,8 @@ if(BOOST_CRYPT_ENABLE_CUDA) enable_language(CUDA) - # Let CMake think we want "CUDA17" so it won't fail: - #set(CMAKE_CUDA_STANDARD 17) - #set(CMAKE_CUDA_STANDARD_REQUIRED ON) - - # But actually pass C++20 to NVCC: - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --std=c++20") + set(CMAKE_CUDA_STANDARD 20) + set(CMAKE_CUDA_STANDARD_REQUIRED ON) set(CMAKE_CUDA_EXTENSIONS OFF)