diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-02-08 21:51:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-10 21:08:06 (GMT) |
commit | 44f3acb202c316bc6a863a1823aaafae486c899a (patch) | |
tree | 58969a6efd466eee165d0e288cb7f15778242783 /Tests/CudaOnly | |
parent | 84df4a49500e51ac6e2a19a77e385e66234386f7 (diff) | |
download | CMake-44f3acb202c316bc6a863a1823aaafae486c899a.zip CMake-44f3acb202c316bc6a863a1823aaafae486c899a.tar.gz CMake-44f3acb202c316bc6a863a1823aaafae486c899a.tar.bz2 |
CUDA: Detect the toolkit include directories
The `nvcc -v` output provides what include directories need to be added
to use the CUDA toolkit from other languages ( C/C++ ).
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r-- | Tests/CudaOnly/EnableStandard/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/CudaOnly/EnableStandard/CMakeLists.txt b/Tests/CudaOnly/EnableStandard/CMakeLists.txt index 53b9132..35a1deb 100644 --- a/Tests/CudaOnly/EnableStandard/CMakeLists.txt +++ b/Tests/CudaOnly/EnableStandard/CMakeLists.txt @@ -13,3 +13,14 @@ target_link_libraries(CudaOnlyEnableStandard PRIVATE CUDAStatic11 CUDADynamic11) set_target_properties(CUDAStatic11 CUDADynamic11 PROPERTIES CUDA_STANDARD 11) set_target_properties(CUDAStatic11 CUDADynamic11 PROPERTIES CUDA_STANDARD_REQUIRED TRUE) + +#Verify CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES +foreach(dir ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) + if(NOT IS_DIRECTORY "${dir}") + message(FATAL_ERROR + "CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES entry\n" + " ${dir}\n" + "is not an existing directory." + ) + endif() +endforeach() |