mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 21:50:39 -06:00
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
This commit is contained in:
committed by
Brad King
parent
0c86d15459
commit
4ea6d3c3ae
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user