summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx11
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h2
2 files changed, 8 insertions, 5 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");
}
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 860b809..6607e77 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -215,7 +215,7 @@ private:
unsigned int NsightTegraVersion[4];
bool TargetCompileAsWinRT;
std::set<std::string> IPOEnabledConfigurations;
- std::set<std::string> SpectreMitigationConfigurations;
+ std::map<std::string, std::string> SpectreMitigation;
cmGlobalVisualStudio10Generator* const GlobalGenerator;
cmLocalVisualStudio10Generator* const LocalGenerator;
std::set<std::string> CSharpCustomCommandNames;