diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2023-09-26 16:16:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-27 17:28:52 (GMT) |
commit | 4316d4dcfd00bd261f7902de68013522bdb9933b (patch) | |
tree | 8bf21d8b444ffd7c4b1b7f2c105814eb3b31b1a4 /Tests/Cuda | |
parent | 5a79ea2799e27dc78d71ad71cbf7009416e98076 (diff) | |
download | CMake-4316d4dcfd00bd261f7902de68013522bdb9933b.zip CMake-4316d4dcfd00bd261f7902de68013522bdb9933b.tar.gz CMake-4316d4dcfd00bd261f7902de68013522bdb9933b.tar.bz2 |
FindCUDAToolkit: Search all of `nvcc` implicit includes and library dirs
Improves the handling of CUDA layouts where we have multiple include
and library directories listed in the output of `nvcc -v`. This
updates both when the CUDA language is enabled or not.
Fixes: #24915
Diffstat (limited to 'Tests/Cuda')
-rw-r--r-- | Tests/Cuda/Toolkit/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt index 8432b71..c2989f0 100644 --- a/Tests/Cuda/Toolkit/CMakeLists.txt +++ b/Tests/Cuda/Toolkit/CMakeLists.txt @@ -26,9 +26,11 @@ set(should_exist CUDAToolkit_LIBRARY_ROOT ) foreach (cuda_loc_var IN LISTS should_exist) - if(NOT EXISTS "${${cuda_loc_var}}") - message(FATAL_ERROR "${cuda_loc_var} variable is expected to be set to valid path") - endif() + foreach (entry IN LISTS ${cuda_loc_var}) + if(NOT EXISTS "${entry}") + message(FATAL_ERROR "${cuda_loc_var} variable is expected to be set to valid path") + endif() + endforeach() endforeach() |