summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda/Toolkit/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Cuda/Toolkit/CMakeLists.txt')
-rw-r--r--Tests/Cuda/Toolkit/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt
index 4df29fa..e6b298d 100644
--- a/Tests/Cuda/Toolkit/CMakeLists.txt
+++ b/Tests/Cuda/Toolkit/CMakeLists.txt
@@ -30,6 +30,8 @@ endif()
foreach (cuda_lib IN LISTS cuda_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 [[\.\./]])
+ message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY[\"${CUDA_${cuda_lib}_LIBRARY}\"] to not contain /..")
endif()
if(NOT TARGET CUDA::${cuda_lib})
message(FATAL_ERROR "expected CUDAToolkit target CUDA::${cuda_lib} not found")
@@ -41,6 +43,9 @@ if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 11)
list(APPEND npp_libs nppicom)
endif()
foreach (cuda_lib IN LISTS npp_libs)
+ if(CUDA_${cuda_lib}_LIBRARY MATCHES [[\.\./]])
+ message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY[\"${CUDA_${cuda_lib}_LIBRARY}\"] to not contain /..")
+ endif()
if(NOT TARGET CUDA::${cuda_lib})
message(FATAL_ERROR "The CUDA::${cuda_lib} target was expected but couldn't be found")
endif()