Skip to content

Commit

Permalink
CMAKE_C_COMPILER_VERSION VERSION_LESS 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Feb 27, 2024
1 parent d02273a commit 0d5a021
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_
add_compile_definitions(USE_CXX17=1)
message("USE C++17")
set(CMAKE_CXX_STANDARD 17)
elseif(USE_CUDA AND CMAKE_CUDA_COMPILER AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12)
add_compile_definitions(USE_CXX17=1)
message("USE C++17 Because of CUDA Version is less than 12")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)
#elseif(USE_CUDA AND CMAKE_CUDA_COMPILER AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12)
# add_compile_definitions(USE_CXX17=1)
# message("USE C++17 Because of CUDA Version is less than 12")
# set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_CUDA_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 20)
endif()
Expand Down

0 comments on commit 0d5a021

Please sign in to comment.