Browse Source

Merge topic 'msvc_support_nvcc--compiler-options'

568298a336 CUDA: MSVC + NVCC support --compiler-options compiler flag

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4177
Kyle Edwards 5 years ago
parent
commit
2c95cb3c2e
2 changed files with 21 additions and 1 deletions
  1. 20 0
      Templates/MSBuild/FlagTables/v10_Cuda.json
  2. 1 1
      Tests/CudaOnly/WithDefs/CMakeLists.txt

+ 20 - 0
Templates/MSBuild/FlagTables/v10_Cuda.json

@@ -19,6 +19,26 @@
       "SpaceAppendable"
     ]
   },
+  {
+    "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",

+ 1 - 1
Tests/CudaOnly/WithDefs/CMakeLists.txt

@@ -28,7 +28,7 @@ target_compile_options(CudaOnlyWithDefs
   PRIVATE
     -DFLAG_COMPILE_LANG_$<COMPILE_LANGUAGE>
     -DFLAG_LANG_IS_CUDA=$<COMPILE_LANGUAGE:CUDA>
-    -Xcompiler=-DHOST_DEFINE
+    --compiler-options=-DHOST_DEFINE
     $<$<CONFIG:DEBUG>:$<BUILD_INTERFACE:${debug_compile_flags}>>
   )