mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
CUDA: Actually use reverse architecture deprecation order for Clang
The code now matches what the comment describes.
This mistake seems to have been present since the initial introduction in
commit 5df21adf (CUDA: Add support for Clang compiler, 2020-05-07).
This commit is contained in:
@@ -283,7 +283,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
|
||||
if(NOT CMAKE_CUDA_ARCHITECTURES)
|
||||
# Clang doesn't automatically select an architecture supported by the SDK.
|
||||
# Try in reverse order of deprecation with the most recent at front (i.e. the most likely to work for new setups).
|
||||
foreach(arch "20" "30" "52")
|
||||
foreach(arch "52" "30" "20")
|
||||
list(APPEND CMAKE_CUDA_COMPILER_ID_TEST_FLAGS_FIRST "${clang_test_flags} --cuda-gpu-arch=sm_${arch}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user