summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-20 14:45:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-20 14:45:58 (GMT)
commit1da5a6ea39d77a13f0ef15aa2fc0e78b452cb4ef (patch)
treea421125819a0d854923fe00980de5d736822360b /Tests
parent967ba2e18055943faabf6eec39703bcad95a7551 (diff)
parent00e13993fde86d3674882aa9e63c46b4e1041462 (diff)
downloadCMake-1da5a6ea39d77a13f0ef15aa2fc0e78b452cb4ef.zip
CMake-1da5a6ea39d77a13f0ef15aa2fc0e78b452cb4ef.tar.gz
CMake-1da5a6ea39d77a13f0ef15aa2fc0e78b452cb4ef.tar.bz2
Merge topic 'cuda-sep-comp-var'
00e13993 CUDA: Add CMAKE_CUDA_SEPARABLE_COMPILATION variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alexander Korsunsky <a.korsunsky@gmail.com> Merge-request: !1495
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CudaOnly/SeparateCompilation/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index 7ef626f..cfca823 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -13,7 +13,13 @@ string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
+get_property(sep_comp TARGET CUDASeparateLibA PROPERTY CUDA_SEPARABLE_COMPILATION)
+if(NOT sep_comp)
+ message(FATAL_ERROR "CUDA_SEPARABLE_COMPILATION not initialized")
+endif()
+unset(CMAKE_CUDA_SEPARABLE_COMPILATION)
if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
# Test adding a flag that is not in our CUDA flag table for VS.