summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-19 15:55:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-01-19 15:56:07 (GMT)
commit663bc936e843fe433d3a5dfddf02a11e5fff8a16 (patch)
tree935e8468965b24080138e8e87fdbcab0eb4e4021
parent10021726adb4391f547f02704ec638388203723f (diff)
parent6251edc5a42be2d1ae8494ed45cc28cb321ce509 (diff)
downloadCMake-663bc936e843fe433d3a5dfddf02a11e5fff8a16.zip
CMake-663bc936e843fe433d3a5dfddf02a11e5fff8a16.tar.gz
CMake-663bc936e843fe433d3a5dfddf02a11e5fff8a16.tar.bz2
Merge topic 'cuda-clang' into release-3.28
6251edc5a4 CUDA/Clang: Record architectures supported by Clang 16 07b7d0ceaa CUDA/Clang: Update architectures supported by CUDA 12 Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !9164
-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