diff options
author | Brad King <brad.king@kitware.com> | 2019-07-31 15:41:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-31 15:41:37 (GMT) |
commit | cb8863279033d9dd81d01edcbb5cc8ae1911b06c (patch) | |
tree | 96c6596a1b93c938214983427bd0a7167a265d78 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 72c1d564ccb1f1e33ff0c893b0bfc22abbda124e (diff) | |
parent | f9b7c660d700ffa2166b80333bfd89f96fbfb186 (diff) | |
download | CMake-cb8863279033d9dd81d01edcbb5cc8ae1911b06c.zip CMake-cb8863279033d9dd81d01edcbb5cc8ae1911b06c.tar.gz CMake-cb8863279033d9dd81d01edcbb5cc8ae1911b06c.tar.bz2 |
Merge topic 'vs-spectre-off'
f9b7c660d7 VS: Fix mapping of `-Qspectre-` flag
Acked-by: Kitware Robot <kwrobot@kitware.com>
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 4a151b3..ed6e4d9 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1235,8 +1235,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); + } } } @@ -2766,8 +2769,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"); } |