summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-10 12:48:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-10 12:48:50 (GMT)
commitbb68658e9827ddec69bf42f957693150b6bd2e0a (patch)
treea619e8a5cb8e11f47331d8af83bf319fa937a1b2 /Modules
parent17c4ee406a44129533154f60e2ec3345aa1e6949 (diff)
parentcd89d1c328439709eb090e099774bbb6ddf8eb95 (diff)
downloadCMake-bb68658e9827ddec69bf42f957693150b6bd2e0a.zip
CMake-bb68658e9827ddec69bf42f957693150b6bd2e0a.tar.gz
CMake-bb68658e9827ddec69bf42f957693150b6bd2e0a.tar.bz2
Merge topic 'findcudatoolkit_handle_cuda_compiler_without_enabled_lang'
cd89d1c328 FindCUDAToolkit: Robust version checks when CUDA lang is not enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Tested-by: Raul Tambre <raul@tambre.ee> Merge-request: !5787
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDAToolkit.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 83de97b..256c98f 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -737,6 +737,7 @@ elseif(NOT CUDAToolkit_FIND_QUIETLY)
endif()
if(CUDAToolkit_NVCC_EXECUTABLE AND
+ CMAKE_CUDA_COMPILER_VERSION AND
CUDAToolkit_NVCC_EXECUTABLE STREQUAL CMAKE_CUDA_COMPILER)
# Need to set these based off the already computed CMAKE_CUDA_COMPILER_VERSION value
# This if statement will always match, but is used to provide variables for MATCH 1,2,3...