diff options
author | Brad King <brad.king@kitware.com> | 2019-07-30 15:20:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-30 15:20:59 (GMT) |
commit | 4053d5737d917c3cb34af5d510a65ca26ed1763e (patch) | |
tree | fece7c99de6e18c6002694f13a583b17b37cc8f8 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 055a782b8a6d43492f97572a02883b7120ac3736 (diff) | |
parent | f9b7c660d700ffa2166b80333bfd89f96fbfb186 (diff) | |
download | CMake-4053d5737d917c3cb34af5d510a65ca26ed1763e.zip CMake-4053d5737d917c3cb34af5d510a65ca26ed1763e.tar.gz CMake-4053d5737d917c3cb34af5d510a65ca26ed1763e.tar.bz2 |
Merge branch 'vs-spectre-off' into release-3.15
Merge-request: !3629
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8c6ba4e..7d25713 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1229,8 +1229,11 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( if (this->IPOEnabledConfigurations.count(config) > 0) { e1.Element("WholeProgramOptimization", "true"); } - if (this->SpectreMitigationConfigurations.count(config) > 0) { - e1.Element("SpectreMitigation", "Spectre"); + { + auto s = this->SpectreMitigation.find(config); + if (s != this->SpectreMitigation.end()) { + e1.Element("SpectreMitigation", s->second); + } } } @@ -2760,8 +2763,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } } - if (clOptions.HasFlag("SpectreMitigation")) { - this->SpectreMitigationConfigurations.insert(configName); + if (const char* s = clOptions.GetFlag("SpectreMitigation")) { + this->SpectreMitigation[configName] = s; clOptions.RemoveFlag("SpectreMitigation"); } |