diff options
author | Brad King <brad.king@kitware.com> | 2017-03-07 21:12:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-10 15:19:56 (GMT) |
commit | 4def02a3852eb211e26951819646f8cd8ee6c00c (patch) | |
tree | 428ac536110f48862923479e7430ed95047e04a7 /Source/cmVS10CudaHostFlagTable.h | |
parent | 29f07b08671ea8a8cf2b32c6b740a2ecaa58168c (diff) | |
download | CMake-4def02a3852eb211e26951819646f8cd8ee6c00c.zip CMake-4def02a3852eb211e26951819646f8cd8ee6c00c.tar.gz CMake-4def02a3852eb211e26951819646f8cd8ee6c00c.tar.bz2 |
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/cmVS10CudaHostFlagTable.h')
-rw-r--r-- | Source/cmVS10CudaHostFlagTable.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/Source/cmVS10CudaHostFlagTable.h b/Source/cmVS10CudaHostFlagTable.h index 5ad05f1..5b61066 100644 --- a/Source/cmVS10CudaHostFlagTable.h +++ b/Source/cmVS10CudaHostFlagTable.h @@ -1 +1,35 @@ -static cmVS7FlagTable cmVS10CudaHostFlagTable[] = { { 0, 0, 0, 0, 0 } }; +static cmVS7FlagTable cmVS10CudaHostFlagTable[] = { + //{"Optimization", "", "<inherit from host>", "InheritFromHost", 0}, + { "Optimization", "Od", "Disabled", "Od", 0 }, + { "Optimization", "O1", "Minimize Size", "O1", 0 }, + { "Optimization", "O2", "Maximize Speed", "O2", 0 }, + { "Optimization", "Ox", "Full Optimization", "O3", 0 }, + + //{"Runtime", "", "<inherit from host>", "InheritFromHost", 0}, + { "Runtime", "MT", "Multi-Threaded", "MT", 0 }, + { "Runtime", "MTd", "Multi-Threaded Debug", "MTd", 0 }, + { "Runtime", "MD", "Multi-Threaded DLL", "MD", 0 }, + { "Runtime", "MDd", "Multi-threaded Debug DLL", "MDd", 0 }, + { "Runtime", "ML", "Single-Threaded", "ML", 0 }, + { "Runtime", "MLd", "Single-Threaded Debug", "MLd", 0 }, + + //{"RuntimeChecks", "", "<inherit from host>", "InheritFromHost", 0}, + //{"RuntimeChecks", "", "Default", "Default", 0}, + { "RuntimeChecks", "RTCs", "Stack Frames", "RTCs", 0 }, + { "RuntimeChecks", "RTCu", "Uninitialized Variables", "RTCu", 0 }, + { "RuntimeChecks", "RTC1", "Both", "RTC1", 0 }, + + //{"TypeInfo", "", "<inherit from host>", "InheritFromHost", 0}, + { "TypeInfo", "GR", "Yes", "true", 0 }, + { "TypeInfo", "GR-", "No", "false", 0 }, + + //{"Warning", "", "<inherit from host>", "InheritFromHost", 0}, + { "Warning", "W0", "Off: Turn Off All Warnings", "W0", 0 }, + { "Warning", "W1", "Level 1", "W1", 0 }, + { "Warning", "W2", "Level 2", "W2", 0 }, + { "Warning", "W3", "Level 3", "W3", 0 }, + { "Warning", "W4", "Level 4", "W4", 0 }, + { "Warning", "Wall", "Enable All Warnings", "Wall", 0 }, + + { 0, 0, 0, 0, 0 } +}; |