summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorHong Xu <hong@topbug.net>2019-10-31 20:50:24 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-01 13:57:11 (GMT)
commit067ee518f792b2babc9ae53c69bddeb5e15f3d76 (patch)
treec97ec94c94703a649edcad853b5bc3970ca33a1e /Modules/FindCUDA.cmake
parentaeaa590cb206bce9407993baf0c90c8979d0af8c (diff)
downloadCMake-067ee518f792b2babc9ae53c69bddeb5e15f3d76.zip
CMake-067ee518f792b2babc9ae53c69bddeb5e15f3d76.tar.gz
CMake-067ee518f792b2babc9ae53c69bddeb5e15f3d76.tar.bz2
FindCUDA: Use find_program instead of find_path to find nvcc
Otherwise nvcc is not found if it is in env PATH but a non-standard location.
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 b6859aa..79d7fda 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_path(CUDA_TOOLKIT_ROOT_DIR
+ find_program(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_path(CUDA_TOOLKIT_ROOT_DIR
+ find_program(CUDA_TOOLKIT_ROOT_DIR
NAMES nvcc nvcc.exe
PATHS /opt/cuda/bin
PATH_SUFFIXES cuda/bin