diff options
author | Raul Tambre <raul@tambre.ee> | 2020-06-12 16:59:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-15 13:13:32 (GMT) |
commit | 877a92e968bfa24d86f4b9685b5c27d4c9e6c1be (patch) | |
tree | 3c410caeece84452eff2f1ef27eb01b5b1b54f1f /Modules/CMakeDetermineCUDACompiler.cmake | |
parent | 594fda9c234915669dbfe61bec7c59250e747b4a (diff) | |
download | CMake-877a92e968bfa24d86f4b9685b5c27d4c9e6c1be.zip CMake-877a92e968bfa24d86f4b9685b5c27d4c9e6c1be.tar.gz CMake-877a92e968bfa24d86f4b9685b5c27d4c9e6c1be.tar.bz2 |
CUDA: Add support for disabling CUDA_ARCHITECTURES
The ability to disable adding architectures completely for packaging purposes
and cases requiring passing the architectures flags explicitly has been
requested.
Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES
for this purpose.
Implements #20821.
Diffstat (limited to 'Modules/CMakeDetermineCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 5ae3908..1273831 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -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) |