mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
committed by
Brad King
parent
410dd6cf61
commit
d13c8d25e6
@@ -1468,6 +1468,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
|
||||
if (this->IPOEnabledConfigurations.count(config) > 0) {
|
||||
e1.Element("WholeProgramOptimization", "true");
|
||||
}
|
||||
if (this->ASanEnabledConfigurations.find(config) !=
|
||||
this->ASanEnabledConfigurations.end()) {
|
||||
e1.Element("EnableAsan", "true");
|
||||
}
|
||||
{
|
||||
auto s = this->SpectreMitigation.find(config);
|
||||
if (s != this->SpectreMitigation.end()) {
|
||||
@@ -3075,6 +3079,11 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
this->IPOEnabledConfigurations.insert(configName);
|
||||
}
|
||||
|
||||
// Check if ASan is enabled.
|
||||
if (flags.find("/fsanitize=address") != std::string::npos) {
|
||||
this->ASanEnabledConfigurations.insert(configName);
|
||||
}
|
||||
|
||||
// Precompile Headers
|
||||
std::string pchHeader =
|
||||
this->GeneratorTarget->GetPchHeader(configName, linkLanguage);
|
||||
|
||||
@@ -229,6 +229,7 @@ private:
|
||||
unsigned int NsightTegraVersion[4];
|
||||
bool TargetCompileAsWinRT;
|
||||
std::set<std::string> IPOEnabledConfigurations;
|
||||
std::set<std::string> ASanEnabledConfigurations;
|
||||
std::map<std::string, std::string> SpectreMitigation;
|
||||
cmGlobalVisualStudio10Generator* const GlobalGenerator;
|
||||
cmLocalVisualStudio10Generator* const LocalGenerator;
|
||||
|
||||
Reference in New Issue
Block a user