summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-13 14:16:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-13 14:16:25 (GMT)
commit7b81b1c72c5885ac5ec8097ff8f15677e55d8f94 (patch)
treef747308db2dff6a14ed527b47621b3789a628913 /Tests
parent40ad7cabc69149391d95c39bb578def164c80441 (diff)
parentb53766b2058160853a29c2bbf8dbfef7345552a4 (diff)
downloadCMake-7b81b1c72c5885ac5ec8097ff8f15677e55d8f94.zip
CMake-7b81b1c72c5885ac5ec8097ff8f15677e55d8f94.tar.gz
CMake-7b81b1c72c5885ac5ec8097ff8f15677e55d8f94.tar.bz2
Merge topic 'cuda_compiler_generator_expressions'
b53766b205 CUDA: Support compiler id and version generator expressions b544e34af6 All VersionNode use the same capitalization pattern Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3085
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CudaOnly/WithDefs/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/WithDefs/main.notcu8
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt
index e58204d..00fd7d2 100644
--- a/Tests/CudaOnly/WithDefs/CMakeLists.txt
+++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt
@@ -37,6 +37,8 @@ target_compile_definitions(CudaOnlyWithDefs
$<$<CONFIG:RELEASE>:$<BUILD_INTERFACE:${release_compile_defs}>>
-DDEF_COMPILE_LANG_$<COMPILE_LANGUAGE>
-DDEF_LANG_IS_CUDA=$<COMPILE_LANGUAGE:CUDA>
+ -DDEF_CUDA_COMPILER=$<CUDA_COMPILER_ID>
+ -DDEF_CUDA_COMPILER_VERSION=$<CUDA_COMPILER_VERSION>
)
target_include_directories(CudaOnlyWithDefs
diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu
index 98f73ce..68a296b 100644
--- a/Tests/CudaOnly/WithDefs/main.notcu
+++ b/Tests/CudaOnly/WithDefs/main.notcu
@@ -39,6 +39,14 @@
# error "Expected DEF_LANG_IS_CUDA"
#endif
+#ifndef DEF_CUDA_COMPILER
+# error "DEF_CUDA_COMPILER not defined!"
+#endif
+
+#ifndef DEF_CUDA_COMPILER_VERSION
+# error "DEF_CUDA_COMPILER_VERSION not defined!"
+#endif
+
static __global__ void DetermineIfValidCudaDevice()
{
}