diff options
author | Brad King <brad.king@kitware.com> | 2018-10-08 18:04:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-09 10:28:57 (GMT) |
commit | 92ed3b38cc892b3acb78d9b4f83c35375b854b00 (patch) | |
tree | 4f046e0520170e401e0d17cf2aa8b7bbc6f2e16e | |
parent | 0e2799019fcd207d1050fb89f0cdea579f9aff64 (diff) | |
parent | bb60ed6e724b2891a33f3cd5b6e5aa300dcc4180 (diff) | |
download | CMake-92ed3b38cc892b3acb78d9b4f83c35375b854b00.zip CMake-92ed3b38cc892b3acb78d9b4f83c35375b854b00.tar.gz CMake-92ed3b38cc892b3acb78d9b4f83c35375b854b00.tar.bz2 |
Merge branch 'vs-flag-map-Qspectre' into release-3.13
Merge-request: !2462
-rw-r--r-- | Source/cmVS141CLFlagTable.h | 2 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmVS141CLFlagTable.h b/Source/cmVS141CLFlagTable.h index 7d3e356..2a9944a 100644 --- a/Source/cmVS141CLFlagTable.h +++ b/Source/cmVS141CLFlagTable.h @@ -83,6 +83,8 @@ static cmVS7FlagTable cmVS141CLFlagTable[] = { { "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 }, { "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 }, + { "SpectreMitigation", "Qspectre", "Spectre mitigations", "Spectre", 0 }, + { "LanguageStandard", "std:c++17", "ISO C++17 Standard", "stdcpp17", 0 }, { "LanguageStandard", "std:c++14", "ISO C++14 Standard", "stdcpp14", 0 }, { "LanguageStandard", "std:c++latest", "ISO C++ Latest Draft Standard", diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 16eca96..57d66e0 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1125,6 +1125,9 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( if (this->IPOEnabledConfigurations.count(config) > 0) { e1.Element("WholeProgramOptimization", "true"); } + if (this->SpectreMitigationConfigurations.count(config) > 0) { + e1.Element("SpectreMitigation", "Spectre"); + } } void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValuesManaged( @@ -2625,6 +2628,11 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } } + if (clOptions.HasFlag("SpectreMitigation")) { + this->SpectreMitigationConfigurations.insert(configName); + clOptions.RemoveFlag("SpectreMitigation"); + } + this->ClOptions[configName] = std::move(pOptions); return true; } diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 829d2bf..0dc03b6 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -205,6 +205,7 @@ private: unsigned int NsightTegraVersion[4]; bool TargetCompileAsWinRT; std::set<std::string> IPOEnabledConfigurations; + std::set<std::string> SpectreMitigationConfigurations; cmGlobalVisualStudio10Generator* const GlobalGenerator; cmLocalVisualStudio10Generator* const LocalGenerator; std::set<std::string> CSharpCustomCommandNames; |