summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-12-12 13:07:36 -0500
committerRobert Maynard <robert.maynard@kitware.com>2019-12-16 14:35:03 -0500
commitd484a3c4d8f0bed1da42e17126bac8f7840463ef (patch)
tree94d604f51cd34a3cf185675e7589f02fb61b72d1 /Tests
parente2a5d8374f94c7893109e11173fc770cec8a4683 (diff)
downloadcmake-d484a3c4d8f0bed1da42e17126bac8f7840463ef.tar.gz
FindCUDAToolkit: correct searches for Toolkit components
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Cuda/Toolkit/CMakeLists.txt9
-rw-r--r--Tests/CudaOnly/Toolkit/CMakeLists.txt12
2 files changed, 2 insertions, 19 deletions
diff --git a/Tests/Cuda/Toolkit/CMakeLists.txt b/Tests/Cuda/Toolkit/CMakeLists.txt
index 45b700b878..86b4652191 100644
--- a/Tests/Cuda/Toolkit/CMakeLists.txt
+++ b/Tests/Cuda/Toolkit/CMakeLists.txt
@@ -28,18 +28,11 @@ foreach (cuda_lib nppc nppial nppicc nppidei nppif nppig nppim nppist nppitc npp
endif()
endforeach()
-foreach (cuda_lib nvrtc nvToolsExt OpenCL culibos)
+foreach (cuda_lib nvrtc nvToolsExt OpenCL)
if(NOT TARGET CUDA::${cuda_lib})
message(FATAL_ERROR "The CUDA::${cuda_lib} target was expected but couldn't be found")
endif()
endforeach()
-#libraries added CUDA 10
-if(CUDAToolkit_VERSION_MAJOR VERSION_GREATER 9)
- if(NOT TARGET CUDA::nvjpeg)
- message(FATAL_ERROR "The CUDA::nvjpeg target was expected but couldn't be found")
- endif()
-endif()
-
add_executable(Toolkit main.cpp)
target_link_libraries(Toolkit PRIVATE CUDA::toolkit)
diff --git a/Tests/CudaOnly/Toolkit/CMakeLists.txt b/Tests/CudaOnly/Toolkit/CMakeLists.txt
index 682e56e7b2..0d5d574a52 100644
--- a/Tests/CudaOnly/Toolkit/CMakeLists.txt
+++ b/Tests/CudaOnly/Toolkit/CMakeLists.txt
@@ -30,7 +30,7 @@ foreach (cuda_lib nppc nppial nppicc nppidei nppif nppig nppim nppist nppitc npp
endif()
endforeach()
-foreach (cuda_lib nvrtc nvToolsExt OpenCL culibos)
+foreach (cuda_lib nvrtc nvToolsExt OpenCL)
if(NOT CUDA_${cuda_lib}_LIBRARY)
message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY not found")
endif()
@@ -40,15 +40,5 @@ foreach (cuda_lib nvrtc nvToolsExt OpenCL culibos)
endif()
endforeach()
-#libraries added as CUDA 10
-if(CUDAToolkit_VERSION_MAJOR VERSION_GREATER 9)
- if(NOT CUDA_nvjpeg_LIBRARY)
- message(FATAL_ERROR "expected CUDAToolkit variable CUDA_nvjpeg_LIBRARY not found")
- endif()
- if(NOT TARGET CUDA::nvjpeg)
- message(FATAL_ERROR "The CUDA::nvjpeg target was expected but couldn't be found")
- endif()
-endif()
-
add_executable(CudaOnlyToolkit main.cu)
target_link_libraries(CudaOnlyToolkit PRIVATE CUDA::toolkit)