summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/WithDefs/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-21 17:44:43 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-21 18:23:46 (GMT)
commitf2059585e6302446707560b123c7b785df5f5859 (patch)
treee29520e82e81a0e4fb5ffba8447bcf7edb7cded6 /Tests/CudaOnly/WithDefs/CMakeLists.txt
parentab4c3270ae7062a8f3296055b9f6443b80f3aef2 (diff)
downloadCMake-f2059585e6302446707560b123c7b785df5f5859.zip
CMake-f2059585e6302446707560b123c7b785df5f5859.tar.gz
CMake-f2059585e6302446707560b123c7b785df5f5859.tar.bz2
VS: Fix target_compile_options for CUDA
Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA. The exclusion added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options to C compiler, 2017-03-07) was correct but we need additional logic to pass the CUDA compile options to the CUDA compiler. Also we should still pass the CXX or C options to MSVC (ClCompile) when those languages are enabled even if the link language is CUDA.
Diffstat (limited to 'Tests/CudaOnly/WithDefs/CMakeLists.txt')
-rw-r--r--Tests/CudaOnly/WithDefs/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt
index 38f2a44..e25f141 100644
--- a/Tests/CudaOnly/WithDefs/CMakeLists.txt
+++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt
@@ -28,6 +28,7 @@ add_executable(CudaOnlyWithDefs ${main})
target_compile_options(CudaOnlyWithDefs
PRIVATE
+ -Xcompiler=-DHOST_DEFINE
$<$<CONFIG:DEBUG>:$<BUILD_INTERFACE:${debug_compile_flags}>>
)