cmGeneratorTarget: Port getTypedProperty to cmGeneratorTarget.

This commit is contained in:
Stephen Kelly 2015-10-08 01:47:02 +02:00
parent 5fd2f43f64
commit 43ade99577

View File

@ -3980,18 +3980,20 @@ std::string compatibilityAgree(CompatibleType t, bool dominant)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
template<typename PropertyType> template<typename PropertyType>
PropertyType getTypedProperty(cmTarget const* tgt, const std::string& prop); PropertyType getTypedProperty(cmGeneratorTarget const* tgt,
const std::string& prop);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
template<> template<>
bool getTypedProperty<bool>(cmTarget const* tgt, const std::string& prop) bool getTypedProperty<bool>(cmGeneratorTarget const* tgt,
const std::string& prop)
{ {
return tgt->GetPropertyAsBool(prop); return tgt->GetPropertyAsBool(prop);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
template<> template<>
const char *getTypedProperty<const char *>(cmTarget const* tgt, const char *getTypedProperty<const char *>(cmGeneratorTarget const* tgt,
const std::string& prop) const std::string& prop)
{ {
return tgt->GetProperty(prop); return tgt->GetProperty(prop);
@ -4121,7 +4123,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
CompatibleType t, CompatibleType t,
PropertyType *) PropertyType *)
{ {
PropertyType propContent = getTypedProperty<PropertyType>(tgt->Target, p); PropertyType propContent = getTypedProperty<PropertyType>(tgt, p);
const bool explicitlySet = tgt->Target->GetProperties() const bool explicitlySet = tgt->Target->GetProperties()
.find(p) .find(p)
!= tgt->Target->GetProperties().end(); != tgt->Target->GetProperties().end();
@ -4173,7 +4175,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
.find(interfaceProperty) .find(interfaceProperty)
!= theTarget->Target->GetProperties().end(); != theTarget->Target->GetProperties().end();
PropertyType ifacePropContent = PropertyType ifacePropContent =
getTypedProperty<PropertyType>(theTarget->Target, getTypedProperty<PropertyType>(theTarget,
interfaceProperty); interfaceProperty);
std::string reportEntry; std::string reportEntry;