summaryrefslogtreecommitdiff
path: root/Source/cmVS10CudaFlagTable.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-07 16:12:27 -0500
committerBrad King <brad.king@kitware.com>2017-03-10 10:19:56 -0500
commit4def02a3852eb211e26951819646f8cd8ee6c00c (patch)
tree428ac536110f48862923479e7430ed95047e04a7 /Source/cmVS10CudaFlagTable.h
parent29f07b08671ea8a8cf2b32c6b740a2ecaa58168c (diff)
downloadcmake-4def02a3852eb211e26951819646f8cd8ee6c00c.tar.gz
VS: Place CUDA host compiler options in proper project file fields
The CUDA Toolkit's VS integration provides abstractions for host compiler options for `nvcc` to pass through `-Xcompiler` to the host MSVC. Populate our secondary flag table and use it to remove flags from the `AdditionalCompilerOptions` in favor of their abstractions. Unfortunately a bug in the CUDA 8.0 VS integration prevents us from passing anything in `AdditionalCompilerOptions` reliably. After taking out the flags that have dedicated abstractions, drop the rest.
Diffstat (limited to 'Source/cmVS10CudaFlagTable.h')
-rw-r--r--Source/cmVS10CudaFlagTable.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmVS10CudaFlagTable.h b/Source/cmVS10CudaFlagTable.h
index 4df474e019..0a93de8d56 100644
--- a/Source/cmVS10CudaFlagTable.h
+++ b/Source/cmVS10CudaFlagTable.h
@@ -1 +1,9 @@
-static cmVS7FlagTable cmVS10CudaFlagTable[] = { { 0, 0, 0, 0, 0 } };
+static cmVS7FlagTable cmVS10CudaFlagTable[] = {
+ // Collect options meant for the host compiler.
+ { "AdditionalCompilerOptions", "Xcompiler=", "Host compiler options", "",
+ cmVS7FlagTable::UserValue | cmVS7FlagTable::SpaceAppendable },
+ { "AdditionalCompilerOptions", "Xcompiler", "Host compiler options", "",
+ cmVS7FlagTable::UserFollowing | cmVS7FlagTable::SpaceAppendable },
+
+ { 0, 0, 0, 0, 0 }
+};