diff options
author | Brad King <brad.king@kitware.com> | 2024-01-19 15:55:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-01-19 15:56:08 (GMT) |
commit | f7139c3e4a44c7e17c24090cd8f7c5a1ca3123ce (patch) | |
tree | 883da6737236dadad3f6acf03911b5df9729ce55 /Modules/Internal | |
parent | eafd1015a5be482c89abf0aafb7665bbdabe0515 (diff) | |
parent | 6251edc5a42be2d1ae8494ed45cc28cb321ce509 (diff) | |
download | CMake-f7139c3e4a44c7e17c24090cd8f7c5a1ca3123ce.zip CMake-f7139c3e4a44c7e17c24090cd8f7c5a1ca3123ce.tar.gz CMake-f7139c3e4a44c7e17c24090cd8f7c5a1ca3123ce.tar.bz2 |
Merge topic 'cuda-clang'
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
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CMakeCUDAArchitecturesAll.cmake | 14 |
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 |