diff options
author | Stephan Szabo <stephan.szabo@sony.com> | 2018-11-21 17:53:55 (GMT) |
---|---|---|
committer | Stephan Szabo <stephan.szabo@sony.com> | 2018-11-28 15:43:26 (GMT) |
commit | f044bbbf08575cb06f468f30680108162d7288d0 (patch) | |
tree | 2d898f665c7a7f6b2fe41ea54d7cb308d4e82adb /Templates | |
parent | 7faa4d59a858ef0d7eef77c2ae8e8194c2d87385 (diff) | |
download | CMake-f044bbbf08575cb06f468f30680108162d7288d0.zip CMake-f044bbbf08575cb06f468f30680108162d7288d0.tar.gz CMake-f044bbbf08575cb06f468f30680108162d7288d0.tar.bz2 |
VS: Place CUDA host compiler options in proper project file fields
Original header commit v3.9.0-rc1~431^2~6
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 'Templates')
-rw-r--r-- | Templates/MSBuild/FlagTables/v10_Cuda.json | 20 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v10_CudaHost.json | 147 |
2 files changed, 167 insertions, 0 deletions
diff --git a/Templates/MSBuild/FlagTables/v10_Cuda.json b/Templates/MSBuild/FlagTables/v10_Cuda.json index 0d4f101..ab63367 100644 --- a/Templates/MSBuild/FlagTables/v10_Cuda.json +++ b/Templates/MSBuild/FlagTables/v10_Cuda.json @@ -1,2 +1,22 @@ [ + { + "name": "AdditionalCompilerOptions", + "switch": "Xcompiler=", + "comment": "Host compiler options", + "value": "", + "flags": [ + "UserValue", + "SpaceAppendable" + ] + }, + { + "name": "AdditionalCompilerOptions", + "switch": "Xcompiler", + "comment": "Host compiler options", + "value": "", + "flags": [ + "UserFollowing", + "SpaceAppendable" + ] + } ] diff --git a/Templates/MSBuild/FlagTables/v10_CudaHost.json b/Templates/MSBuild/FlagTables/v10_CudaHost.json index 0d4f101..2593ff1 100644 --- a/Templates/MSBuild/FlagTables/v10_CudaHost.json +++ b/Templates/MSBuild/FlagTables/v10_CudaHost.json @@ -1,2 +1,149 @@ [ + { + "name": "Optimization", + "switch": "Od", + "comment": "Disabled", + "value": "Od", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O1", + "comment": "Minimize Size", + "value": "O1", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O2", + "comment": "Maximize Speed", + "value": "O2", + "flags": [] + }, + { + "name": "Optimization", + "switch": "Ox", + "comment": "Full Optimization", + "value": "O3", + "flags": [] + }, + { + "name": "Runtime", + "switch": "MT", + "comment": "Multi-Threaded", + "value": "MT", + "flags": [] + }, + { + "name": "Runtime", + "switch": "MTd", + "comment": "Multi-Threaded Debug", + "value": "MTd", + "flags": [] + }, + { + "name": "Runtime", + "switch": "MD", + "comment": "Multi-Threaded DLL", + "value": "MD", + "flags": [] + }, + { + "name": "Runtime", + "switch": "MDd", + "comment": "Multi-threaded Debug DLL", + "value": "MDd", + "flags": [] + }, + { + "name": "Runtime", + "switch": "ML", + "comment": "Single-Threaded", + "value": "ML", + "flags": [] + }, + { + "name": "Runtime", + "switch": "MLd", + "comment": "Single-Threaded Debug", + "value": "MLd", + "flags": [] + }, + { + "name": "RuntimeChecks", + "switch": "RTCs", + "comment": "Stack Frames", + "value": "RTCs", + "flags": [] + }, + { + "name": "RuntimeChecks", + "switch": "RTCu", + "comment": "Uninitialized Variables", + "value": "RTCu", + "flags": [] + }, + { + "name": "RuntimeChecks", + "switch": "RTC1", + "comment": "Both", + "value": "RTC1", + "flags": [] + }, + { + "name": "TypeInfo", + "switch": "GR", + "comment": "Yes", + "value": "true", + "flags": [] + }, + { + "name": "TypeInfo", + "switch": "GR-", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "Warning", + "switch": "W0", + "comment": "Off: Turn Off All Warnings", + "value": "W0", + "flags": [] + }, + { + "name": "Warning", + "switch": "W1", + "comment": "Level 1", + "value": "W1", + "flags": [] + }, + { + "name": "Warning", + "switch": "W2", + "comment": "Level 2", + "value": "W2", + "flags": [] + }, + { + "name": "Warning", + "switch": "W3", + "comment": "Level 3", + "value": "W3", + "flags": [] + }, + { + "name": "Warning", + "switch": "W4", + "comment": "Level 4", + "value": "W4", + "flags": [] + }, + { + "name": "Warning", + "switch": "Wall", + "comment": "Enable All Warnings", + "value": "Wall", + "flags": [] + } ] |