summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-25 09:35:36 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-27 06:44:23 (GMT)
commit520ca0ff6c123250c633a3618459d0161cbc4683 (patch)
treed1d77c41acba19eb91e4a8e6ef359243a438324f /Source/cmGeneratorTarget.cxx
parent3e3c754b8cc3af463dcea95000daf3a18b359b7a (diff)
downloadCMake-520ca0ff6c123250c633a3618459d0161cbc4683.zip
CMake-520ca0ff6c123250c633a3618459d0161cbc4683.tar.gz
CMake-520ca0ff6c123250c633a3618459d0161cbc4683.tar.bz2
cmGeneratorTarget: Add API for property keys
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx29
1 files changed, 23 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 651c89c..3df43ff 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4251,9 +4251,11 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
PropertyType *)
{
PropertyType propContent = getTypedProperty<PropertyType>(tgt, p);
- const bool explicitlySet = tgt->Target->GetProperties()
- .find(p)
- != tgt->Target->GetProperties().end();
+ std::vector<std::string> headPropKeys = tgt->GetPropertyKeys();
+ const bool explicitlySet =
+ std::find(headPropKeys.begin(), headPropKeys.end(),
+ p) != headPropKeys.end();
+
const bool impliedByUse =
tgt->IsNullImpliedByLinkLibraries(p);
assert((impliedByUse ^ explicitlySet)
@@ -4298,9 +4300,11 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
cmGeneratorTarget const* theTarget = *li;
- const bool ifaceIsSet = theTarget->Target->GetProperties()
- .find(interfaceProperty)
- != theTarget->Target->GetProperties().end();
+ std::vector<std::string> propKeys = theTarget->GetPropertyKeys();
+
+ const bool ifaceIsSet =
+ std::find(propKeys.begin(), propKeys.end(),
+ interfaceProperty) != propKeys.end();
PropertyType ifacePropContent =
getTypedProperty<PropertyType>(theTarget,
interfaceProperty);
@@ -4577,6 +4581,19 @@ void cmGeneratorTarget::ComputeVersionedName(std::string& vName,
vName += this->Makefile->IsOn("APPLE") ? suffix : std::string();
}
+std::vector<std::string> cmGeneratorTarget::GetPropertyKeys() const
+{
+ cmPropertyMap propsObject = this->Target->GetProperties();
+ std::vector<std::string> props;
+ props.reserve(propsObject.size());
+ for (cmPropertyMap::const_iterator it = propsObject.begin();
+ it != propsObject.end(); ++it)
+ {
+ props.push_back(it->first);
+ }
+ return props;
+}
+
//----------------------------------------------------------------------------
void
cmGeneratorTarget::ReportPropertyOrigin(const std::string &p,