diff options
author | Raul Tambre <raul@tambre.ee> | 2020-06-12 17:39:25 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-06-12 18:49:15 (GMT) |
commit | 9eebb5b8b264cad7240d1af515113ca5f2c4ffad (patch) | |
tree | c01a805c2c08c58d06e9f90ca40c3d521af5525f /Modules/CMakeDetermineCUDACompiler.cmake | |
parent | 8f01fe7bf139b019eaff5594b558b17862cfab37 (diff) | |
download | CMake-9eebb5b8b264cad7240d1af515113ca5f2c4ffad.zip CMake-9eebb5b8b264cad7240d1af515113ca5f2c4ffad.tar.gz CMake-9eebb5b8b264cad7240d1af515113ca5f2c4ffad.tar.bz2 |
FindCUDAToolkit: Remove unnecessary checks around searches
find_*() don't search if the result variable is already set.
Remove the if()s around such cases.
Diffstat (limited to 'Modules/CMakeDetermineCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 2c1a40e..534b8b5 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -169,12 +169,10 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") ) # If we didn't find NVCC, then try the default paths. - if(NOT _CUDA_NVCC_EXECUTABLE) - find_program(_CUDA_NVCC_EXECUTABLE - NAMES nvcc nvcc.exe - PATH_SUFFIXES bin - ) - endif() + find_program(_CUDA_NVCC_EXECUTABLE + NAMES nvcc nvcc.exe + PATH_SUFFIXES bin + ) # If the user specified CUDAToolkit_ROOT but nvcc could not be found, this is an error. if(NOT _CUDA_NVCC_EXECUTABLE AND (DEFINED CUDAToolkit_ROOT OR DEFINED ENV{CUDAToolkit_ROOT})) |