diff options
author | Brad King <brad.king@kitware.com> | 2020-07-23 14:58:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-23 14:58:11 (GMT) |
commit | a33a4ec68bbaf8e1a83c4fa241ce77a3634e73d6 (patch) | |
tree | 3043806bb31f2826c600a2e256244677360b4ee2 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 04b25ed8fcfe0ea90c00a4b234d1c85cad102906 (diff) | |
parent | c4109a1bc88f8e3b4ff93de6b784ab57149546bc (diff) | |
download | CMake-a33a4ec68bbaf8e1a83c4fa241ce77a3634e73d6.zip CMake-a33a4ec68bbaf8e1a83c4fa241ce77a3634e73d6.tar.gz CMake-a33a4ec68bbaf8e1a83c4fa241ce77a3634e73d6.tar.bz2 |
Merge branch 'backport-vs-lang-flags' into vs-lang-flags
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index f291cbd..a06dab3 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2919,6 +2919,12 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.RemoveFlag("SpectreMitigation"); } + // Remove any target-wide -TC or -TP flag added by the project. + // Such flags are unnecessary and break our model of language selection. + if (langForClCompile == "C" || langForClCompile == "CXX") { + clOptions.RemoveFlag("CompileAs"); + } + this->ClOptions[configName] = std::move(pOptions); return true; } |