diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-25 09:35:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 06:44:23 (GMT) |
commit | 520ca0ff6c123250c633a3618459d0161cbc4683 (patch) | |
tree | d1d77c41acba19eb91e4a8e6ef359243a438324f /Source/cmGeneratorTarget.cxx | |
parent | 3e3c754b8cc3af463dcea95000daf3a18b359b7a (diff) | |
download | CMake-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.cxx | 29 |
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, |