Skip to content

Commit 807b6ed

Browse files
committed
Workaround old cmake
1 parent fbb17da commit 807b6ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ if(BOOST_CRYPT_ENABLE_CUDA)
1818

1919
enable_language(CUDA)
2020

21-
set(CMAKE_CUDA_STANDARD 20)
21+
# Let CMake think we want "CUDA17" so it won't fail:
22+
set(CMAKE_CUDA_STANDARD 17)
2223
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
24+
25+
# But actually pass C++20 to NVCC:
26+
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --std=c++20")
27+
2328
set(CMAKE_CUDA_EXTENSIONS OFF)
2429

2530
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")

0 commit comments

Comments
 (0)