summaryrefslogtreecommitdiffstats
path: root/Modules/Internal
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Internal')
-rw-r--r--Modules/Internal/CMakeCUDAArchitecturesAll.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake
index 873400a..c588dfb 100644
--- a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake
+++ b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake
@@ -55,23 +55,25 @@ function(cmake_cuda_architectures_all lang lang_var_)
endif()
if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 11.4)
- if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA")
+ if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA"
+ OR (CMAKE_${lang}_COMPILER_ID STREQUAL "Clang" AND CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
+ )
list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL 87)
endif()
endif()
if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 11.8)
- if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA")
+ if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA"
+ OR (CMAKE_${lang}_COMPILER_ID STREQUAL "Clang" AND CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
+ )
list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL 89 90)
list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 90)
endif()
endif()
if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 12.0)
- if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA")
- list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 35 37)
- list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 35)
- endif()
+ list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 35 37)
+ list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 35)
endif()
# only generate jit code for the newest arch for all/all-major