summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-30 12:33:02 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-08 15:41:34 (GMT)
commit5bb53f6b731228e4592066329e8992987289a986 (patch)
tree77176fe26f9f2d658094d5964d56a9abd52d551d /Source/cmGlobalGenerator.cxx
parent855e8759fdf20a209f19f02e8dc5d203f4713a6a (diff)
downloadCMake-5bb53f6b731228e4592066329e8992987289a986.zip
CMake-5bb53f6b731228e4592066329e8992987289a986.tar.gz
CMake-5bb53f6b731228e4592066329e8992987289a986.tar.bz2
cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 82c9155..c43fd91 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1330,9 +1330,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)
@@ -1353,13 +1350,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()));
+ }
}
}
}