summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDAToolkit.cmake
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2021-02-01 20:05:21 (GMT)
committerBrad King <brad.king@kitware.com>2021-02-03 15:35:21 (GMT)
commit4ea6d3c3aea25968fbbd2c4cece56a10eccf48ab (patch)
tree9deddad49355e9a736d11e28bfc0b148ef8cdeb0 /Modules/FindCUDAToolkit.cmake
parent0c86d15459eeef2ddd15644b7bb3d7854f226334 (diff)
downloadCMake-4ea6d3c3aea25968fbbd2c4cece56a10eccf48ab.zip
CMake-4ea6d3c3aea25968fbbd2c4cece56a10eccf48ab.tar.gz
CMake-4ea6d3c3aea25968fbbd2c4cece56a10eccf48ab.tar.bz2
FindCUDAToolkit: Restore use of CUDA_PATH environment variable
Refactoring in commit 7cc815a2a6 (CUDAToolkit: Detect CUDA SDK that don't have nvcc, 2020-07-24, v3.19.0-rc1~366^2) accidentally broke use of the `CUDA_PATH` environment variable. Fixes: #21740
Diffstat (limited to 'Modules/FindCUDAToolkit.cmake')
-rw-r--r--Modules/FindCUDAToolkit.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index b3c8569..d4cd338 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -561,7 +561,7 @@ else()
_CUDAToolkit_find_root_dir(SEARCH_PATHS "${CUDAToolkit_ROOT}" FIND_FLAGS PATH_SUFFIXES bin NO_DEFAULT_PATH)
endif()
if(NOT CUDAToolkit_ROOT_DIR)
- _CUDAToolkit_find_root_dir(FIND_FLAGS PATHS "ENV CUDA_PATH" PATH_SUFFIXES bin)
+ _CUDAToolkit_find_root_dir(FIND_FLAGS PATHS ENV CUDA_PATH PATH_SUFFIXES bin)
endif()
# If the user specified CUDAToolkit_ROOT but the toolkit could not be found, this is an error.