diff options
author | Brad King <brad.king@kitware.com> | 2017-02-14 08:30:30 -0500 |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-02-14 08:30:30 -0500 |
commit | b7d8d80a62d2e2c31863efedd41945c2e9db9bcf (patch) | |
tree | 84a8e182a22b845bb5455d1e41fb0505820a9fe4 /Tests/Cuda | |
parent | 31e96ccca23a034700e780470bf48cff0d7fd15e (diff) | |
parent | 44f3acb202c316bc6a863a1823aaafae486c899a (diff) | |
download | cmake-b7d8d80a62d2e2c31863efedd41945c2e9db9bcf.tar.gz |
Merge topic 'cmake_provide_include_dir_for_toolkit'
44f3acb2 CUDA: Detect the toolkit include directories
Diffstat (limited to 'Tests/Cuda')
-rw-r--r-- | Tests/Cuda/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/Cuda/ToolkitInclude/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/Cuda/ToolkitInclude/main.cpp | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt index 40c9675277..42b00e1dc3 100644 --- a/Tests/Cuda/CMakeLists.txt +++ b/Tests/Cuda/CMakeLists.txt @@ -2,4 +2,5 @@ ADD_TEST_MACRO(Cuda.Complex CudaComplex) ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures) ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary) +ADD_TEST_MACRO(Cuda.ToolkitInclude CudaToolkitInclude) ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags) diff --git a/Tests/Cuda/ToolkitInclude/CMakeLists.txt b/Tests/Cuda/ToolkitInclude/CMakeLists.txt new file mode 100644 index 0000000000..f246b5449d --- /dev/null +++ b/Tests/Cuda/ToolkitInclude/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.8) +project (ToolkitInclude CXX CUDA) + +#Goal for this example: +# Validate that between the CXX implicit include directories and the +# CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES directories we can find +# the cuda runtime headers + +add_executable(CudaToolkitInclude main.cpp) +target_include_directories(CudaToolkitInclude PRIVATE + ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) diff --git a/Tests/Cuda/ToolkitInclude/main.cpp b/Tests/Cuda/ToolkitInclude/main.cpp new file mode 100644 index 0000000000..c8d5c6b30d --- /dev/null +++ b/Tests/Cuda/ToolkitInclude/main.cpp @@ -0,0 +1,8 @@ +// Only thing we care about is that these headers are found +#include <cuda.h> +#include <cuda_runtime_api.h> + +int main() +{ + return 0; +} |