diff options
author | Tobias Ribizel <ribizel@kit.edu> | 2021-03-10 14:55:43 +0100 |
---|---|---|
committer | Tobias Ribizel <ribizel@kit.edu> | 2021-03-15 21:34:05 +0100 |
commit | 55233eee424816843bb0a5c820d3d4ebbdf3da27 (patch) | |
tree | f5f0524b8a4bbb28aba7d11199b78331f941ae53 /Modules/CMakeDetermineCUDACompiler.cmake | |
parent | 336c57edd08354ecbda007491a1820b6371911b2 (diff) | |
download | cmake-55233eee424816843bb0a5c820d3d4ebbdf3da27.tar.gz |
CUDA: Add support for finding nvcc in CUDA_PATH
Previously, nvcc needed to be present in PATH or specified by CUDACXX.
On Windows with vcpkg, the PATH is heavily modified, which lead to
nvcc not being found with the Ninja generator.
Diffstat (limited to 'Modules/CMakeDetermineCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 1ba537a3eb..0f507eaa17 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -31,7 +31,9 @@ else() set(CMAKE_CUDA_COMPILER_LIST nvcc) endif() + set(_CMAKE_CUDA_COMPILER_PATHS "$ENV{CUDA_PATH}/bin") _cmake_find_compiler(CUDA) + unset(_CMAKE_CUDA_COMPILER_PATHS) else() _cmake_find_compiler_path(CUDA) endif() |