summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-04 19:49:53 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-04 19:50:04 (GMT)
commitf4eebeb447e628aac3d1f79b780bc309e2ad5904 (patch)
tree4cb8c0c78d5c5db24c60607d082adc200233cdf0 /Modules/FindCUDA.cmake
parent067ee518f792b2babc9ae53c69bddeb5e15f3d76 (diff)
downloadCMake-f4eebeb447e628aac3d1f79b780bc309e2ad5904.zip
CMake-f4eebeb447e628aac3d1f79b780bc309e2ad5904.tar.gz
CMake-f4eebeb447e628aac3d1f79b780bc309e2ad5904.tar.bz2
FindCUDA: Revert "Use find_program instead of find_path to find nvcc"
Revert commit 067ee518f7 (FindCUDA: Use find_program instead of find_path to find nvcc, 2019-10-31). It causes `CUDA_TOOLKIT_ROOT_DIR` to contain the path to nvcc rather than the toolkit directory.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 79d7fda..b6859aa 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -676,7 +676,7 @@ endif()
# Search for the cuda distribution.
if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING)
# Search in the CUDA_BIN_PATH first.
- find_program(CUDA_TOOLKIT_ROOT_DIR
+ find_path(CUDA_TOOLKIT_ROOT_DIR
NAMES nvcc nvcc.exe
PATHS
ENV CUDA_TOOLKIT_ROOT
@@ -688,7 +688,7 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING)
)
# Now search default paths
- find_program(CUDA_TOOLKIT_ROOT_DIR
+ find_path(CUDA_TOOLKIT_ROOT_DIR
NAMES nvcc nvcc.exe
PATHS /opt/cuda/bin
PATH_SUFFIXES cuda/bin