diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:07 +0900 |
commit | ff17ac9bf99bd184bdd8b6aa7b7e071024b9793b (patch) | |
tree | f796324846cdba1c41226017e13d4b040d643602 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 2916e0eaa4feeff9c06755fc988ec867c23bb2db (diff) | |
download | cmake-1e20bf0a3645bacc7c37694946ca271139f7ec61.tar.gz cmake-1e20bf0a3645bacc7c37694946ca271139f7ec61.tar.bz2 cmake-1e20bf0a3645bacc7c37694946ca271139f7ec61.zip |
Imported Upstream version 3.15.2upstream/3.15.2
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 8c6ba4edf..7d2571384 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"); } |