mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 07:38:33 -05:00
Merge topic 'vs-spectre-off'
f9b7c660d7 VS: Fix mapping of `-Qspectre-` flag
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3629
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user