diff options
author | Brad King <brad.king@kitware.com> | 2024-01-18 19:22:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-18 19:27:29 (GMT) |
commit | 607d271b1f8f8b6551bb9b4f3ca2acc50b41503b (patch) | |
tree | ab06a24f82b4b40f6c44fe15b85c67e0efa92bba /Tests | |
parent | 5eb26fb943b25b13cd8f98739da894593e778f28 (diff) | |
download | CMake-607d271b1f8f8b6551bb9b4f3ca2acc50b41503b.zip CMake-607d271b1f8f8b6551bb9b4f3ca2acc50b41503b.tar.gz CMake-607d271b1f8f8b6551bb9b4f3ca2acc50b41503b.tar.bz2 |
Tests: Do not expect nvToolsExt in CUDA 12 toolkit
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Cuda/Toolkit/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CudaOnly/Toolkit/CMakeLists.txt | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt index 4255b82..08ba20a 100644 --- a/Tests/Cuda/Toolkit/CMakeLists.txt +++ b/Tests/Cuda/Toolkit/CMakeLists.txt @@ -70,7 +70,11 @@ foreach (cuda_lib IN LISTS npp_libs) endif() endforeach() -foreach (cuda_lib nvrtc nvToolsExt OpenCL) +set(nv_libs nvrtc OpenCL) +if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 12) + list(APPEND nv_libs nvToolsExt) +endif() +foreach (cuda_lib IN LISTS nv_libs) if(NOT TARGET CUDA::${cuda_lib}) message(FATAL_ERROR "The CUDA::${cuda_lib} target was expected but couldn't be found") endif() diff --git a/Tests/CudaOnly/Toolkit/CMakeLists.txt b/Tests/CudaOnly/Toolkit/CMakeLists.txt index df1c44c..477c816 100644 --- a/Tests/CudaOnly/Toolkit/CMakeLists.txt +++ b/Tests/CudaOnly/Toolkit/CMakeLists.txt @@ -68,7 +68,11 @@ foreach (cuda_lib IN LISTS npp_libs) endif() endforeach() -foreach (cuda_lib nvrtc nvToolsExt OpenCL) +set(nv_libs nvrtc OpenCL) +if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 12) + list(APPEND nv_libs nvToolsExt) +endif() +foreach (cuda_lib IN LISTS nv_libs) if(NOT CUDA_${cuda_lib}_LIBRARY) message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY not found") elseif(CUDA_${cuda_lib}_LIBRARY MATCHES [[\.\./]]) |