summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-05-02 15:41:44 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2023-05-04 16:26:04 (GMT)
commit587c0443cce41b0c7eabd313299107975db8d656 (patch)
tree588087ea9c4a2796eabc9ca769e5c2d9acaae8d7 /Tests/Cuda
parent5532fcb8f98b31ce0da2ad44781952f209299bda (diff)
downloadCMake-587c0443cce41b0c7eabd313299107975db8d656.zip
CMake-587c0443cce41b0c7eabd313299107975db8d656.tar.gz
CMake-587c0443cce41b0c7eabd313299107975db8d656.tar.bz2
FindCUDAToolkit: Support CUDA version extraction from version.json
Fixes: #24858
Diffstat (limited to 'Tests/Cuda')
-rw-r--r--Tests/Cuda/Toolkit/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt
index b67aa32..8432b71 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)