Merge topic 'cuda_architectures_disable'

877a92e968 CUDA: Add support for disabling CUDA_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4886
This commit is contained in:
Brad King
2020-06-15 13:24:31 +00:00
committed by Kitware Robot
7 changed files with 81 additions and 25 deletions

View File

@@ -352,7 +352,7 @@ endif()
# If the user didn't set the architectures, then set them to a default.
# If the user did, then make sure those architectures worked.
if(DEFINED detected_architecture)
if(DEFINED detected_architecture AND "${CMAKE_CUDA_ARCHITECTURES}" STREQUAL "")
set(CMAKE_CUDA_ARCHITECTURES "${detected_architecture}" CACHE STRING "CUDA architectures")
if(NOT CMAKE_CUDA_ARCHITECTURES)