diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index b8c494f..1c4488f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1334,9 +1334,6 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() const std::vector<cmValueWithOrigin> noconfig_compile_definitions = mf->GetCompileDefinitionsEntries(); - std::vector<std::string> configs; - mf->GetConfigurations(configs); - cmTargets& targets = mf->GetTargets(); for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) @@ -1357,13 +1354,21 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() t->InsertCompileDefinition(*it); } - for(std::vector<std::string>::const_iterator ci = configs.begin(); - ci != configs.end(); ++ci) + cmPolicies::PolicyStatus polSt + = mf->GetPolicyStatus(cmPolicies::CMP0043); + if (polSt == cmPolicies::WARN || polSt == cmPolicies::OLD) { - std::string defPropName = "COMPILE_DEFINITIONS_"; - defPropName += cmSystemTools::UpperCase(*ci); - t->AppendProperty(defPropName.c_str(), - mf->GetProperty(defPropName.c_str())); + std::vector<std::string> configs; + mf->GetConfigurations(configs); + + for(std::vector<std::string>::const_iterator ci = configs.begin(); + ci != configs.end(); ++ci) + { + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += cmSystemTools::UpperCase(*ci); + t->AppendProperty(defPropName.c_str(), + mf->GetProperty(defPropName.c_str())); + } } } } |