From f4eebeb447e628aac3d1f79b780bc309e2ad5904 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 Nov 2019 14:49:53 -0500 Subject: 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. --- Modules/FindCUDA.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/FindCUDA.cmake') diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 79d7fda653..b6859aaf41 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 -- cgit v1.2.1