diff options
Diffstat (limited to 'Tests/CudaOnly/Toolkit/CMakeLists.txt')
-rw-r--r-- | Tests/CudaOnly/Toolkit/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Tests/CudaOnly/Toolkit/CMakeLists.txt b/Tests/CudaOnly/Toolkit/CMakeLists.txt index b2694bf..477c816 100644 --- a/Tests/CudaOnly/Toolkit/CMakeLists.txt +++ b/Tests/CudaOnly/Toolkit/CMakeLists.txt @@ -57,7 +57,7 @@ set(npp_libs nppc nppial nppicc nppidei nppif nppig nppim nppist nppitc npps npp if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 11) list(APPEND npp_libs nppicom) endif() -foreach (cuda_lib ) +foreach (cuda_lib IN LISTS npp_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 [[\.\./]]) @@ -68,7 +68,11 @@ foreach (cuda_lib ) 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 [[\.\./]]) |