summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-19 12:10:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-19 12:10:33 (GMT)
commit33e1dc48c7e2409ef948f2231fb52c697141b0de (patch)
tree24ec6d3caed4ceaf64486b5cfc1ea052549ec327
parentc26853718ec764d02e243bb6bfdabf0f9ec3157c (diff)
parentd9c1f05924239fafc159ed0b24ecdc24228c8e34 (diff)
downloadCMake-33e1dc48c7e2409ef948f2231fb52c697141b0de.zip
CMake-33e1dc48c7e2409ef948f2231fb52c697141b0de.tar.gz
CMake-33e1dc48c7e2409ef948f2231fb52c697141b0de.tar.bz2
Merge topic 'cuda_nvcc_exe_search' into release-3.18
d9c1f05924 CUDA: Fix NVCC executable search during compiler detection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4920
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake8
1 files changed, 1 insertions, 7 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index e12da45..335305e 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -76,13 +76,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
# For NVCC we can easily deduce the SDK binary directory from the compiler path.
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
- get_filename_component(_CUDA_BIN_DIR "${CMAKE_CUDA_COMPILER}" DIRECTORY)
- find_program(CUDAToolkit_NVCC_EXECUTABLE
- NAMES nvcc nvcc.exe
- PATHS ${_CUDA_BIN_DIR}
- NO_DEFAULT_PATH
- )
- unset(_CUDA_BIN_DIR)
+ set(_CUDA_NVCC_EXECUTABLE "${CMAKE_CUDA_COMPILER}")
endif()
# Search using CUDAToolkit_ROOT and then CUDA_PATH for equivalence with FindCUDAToolkit.