From 568298a3366d1ddec38cada2378f86f5e9691e65 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 2 Jan 2020 14:35:24 -0500 Subject: CUDA: MSVC + NVCC support --compiler-options compiler flag Fixes #20164 --- Templates/MSBuild/FlagTables/v10_Cuda.json | 20 ++++++++++++++++++++ Tests/CudaOnly/WithDefs/CMakeLists.txt | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Templates/MSBuild/FlagTables/v10_Cuda.json b/Templates/MSBuild/FlagTables/v10_Cuda.json index 1831b8a..b3230ac 100644 --- a/Templates/MSBuild/FlagTables/v10_Cuda.json +++ b/Templates/MSBuild/FlagTables/v10_Cuda.json @@ -20,6 +20,26 @@ ] }, { + "name": "AdditionalCompilerOptions", + "switch": "-compiler-options=", + "comment": "Host compiler options", + "value": "", + "flags": [ + "UserValue", + "SpaceAppendable" + ] + }, + { + "name": "AdditionalCompilerOptions", + "switch": "-compiler-options", + "comment": "Host compiler options", + "value": "", + "flags": [ + "UserFollowing", + "SpaceAppendable" + ] + }, + { "name": "CudaRuntime", "switch": "cudart=none", "comment": "No CUDA runtime library", diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 00fd7d2..ba9bf04 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -28,7 +28,7 @@ target_compile_options(CudaOnlyWithDefs PRIVATE -DFLAG_COMPILE_LANG_$ -DFLAG_LANG_IS_CUDA=$ - -Xcompiler=-DHOST_DEFINE + --compiler-options=-DHOST_DEFINE $<$:$> ) -- cgit v0.12