diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-03-11 16:33:43 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-03-11 16:33:43 (GMT) |
commit | b53766b2058160853a29c2bbf8dbfef7345552a4 (patch) | |
tree | f3d7cdfadccdbee4f783cfafa1e16a94455bc41c /Tests/CudaOnly | |
parent | b544e34af61d2f12a5da62e29de5d635171b2b1d (diff) | |
download | CMake-b53766b2058160853a29c2bbf8dbfef7345552a4.zip CMake-b53766b2058160853a29c2bbf8dbfef7345552a4.tar.gz CMake-b53766b2058160853a29c2bbf8dbfef7345552a4.tar.bz2 |
CUDA: Support compiler id and version generator expressions
Introduce the CUDA_COMPILER_ID and CUDA_COMPILER_VERSION generator
expressions.
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r-- | Tests/CudaOnly/WithDefs/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CudaOnly/WithDefs/main.notcu | 8 |
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() { } |