diff options
author | Brad King <brad.king@kitware.com> | 2023-05-05 16:34:34 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-05 12:34:54 -0400 |
commit | 76940fecdeb89ef4f907102d85b19a1e35b46ca1 (patch) | |
tree | 0eb0030fbd76a54cd36ecc70e85aa64e4abfc5ed /Tests/Cuda/Toolkit/CMakeLists.txt | |
parent | 95e63aa748e5c748bbf90eac8b57a490913729d9 (diff) | |
parent | 587c0443cce41b0c7eabd313299107975db8d656 (diff) | |
download | cmake-76940fecdeb89ef4f907102d85b19a1e35b46ca1.tar.gz |
Merge topic 'FindCUDAToolkit_more_library_root_detection'
587c0443cc FindCUDAToolkit: Support CUDA version extraction from version.json
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8451
Diffstat (limited to 'Tests/Cuda/Toolkit/CMakeLists.txt')
-rw-r--r-- | Tests/Cuda/Toolkit/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt index b67aa3279f..8432b71ff1 100644 --- a/Tests/Cuda/Toolkit/CMakeLists.txt +++ b/Tests/Cuda/Toolkit/CMakeLists.txt @@ -16,8 +16,22 @@ message(STATUS "CUDAToolkit_VERSION_PATCH: ${CUDAToolkit_VERSION_PATCH}") message(STATUS "CUDAToolkit_BIN_DIR: ${CUDAToolkit_BIN_DIR}") message(STATUS "CUDAToolkit_INCLUDE_DIRS: ${CUDAToolkit_INCLUDE_DIRS}") message(STATUS "CUDAToolkit_LIBRARY_DIR: ${CUDAToolkit_LIBRARY_DIR}") +message(STATUS "CUDAToolkit_LIBRARY_ROOT: ${CUDAToolkit_LIBRARY_ROOT}") message(STATUS "CUDAToolkit_NVCC_EXECUTABLE ${CUDAToolkit_NVCC_EXECUTABLE}") +set(should_exist + CUDAToolkit_BIN_DIR + CUDAToolkit_INCLUDE_DIRS + CUDAToolkit_LIBRARY_DIR + 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() +endforeach() + + set(cuda_libs cudart cuda_driver cublas cufft cufftw curand cusolver cusparse) if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.1) list(APPEND cuda_libs cublasLt) |