diff options
author | Brad King <brad.king@kitware.com> | 2014-01-09 14:37:20 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-09 14:37:20 (GMT) |
commit | 15562c11efa3c3a9e0f28f9ad52b71623c254b05 (patch) | |
tree | 24dfd93e75c0fb8bf618394d379d45cf2f458c49 /Source/cmGlobalGenerator.cxx | |
parent | 69c366a28178027a5cf2629c0240d1709ae9ab55 (diff) | |
parent | 73e93400e2efab2096618ff58a5ad68236cd04aa (diff) | |
download | CMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.zip CMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.tar.gz CMake-15562c11efa3c3a9e0f28f9ad52b71623c254b05.tar.bz2 |
Merge topic 'policies'
73e9340 get_target_property: Error on non-existent target.
ab9f58f FindQt4: Ensure target exists before calling get_target_property.
37ebeb9 FindQt4: Fix use of get_target_property to use actual target name.
6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID.
5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
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())); + } } } } |