Genex: Use a preprocessor foreach to follow transitive properties.
This commit is contained in:
parent
146493363e
commit
77a0fd5135
|
@ -893,26 +893,21 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
|
|
||||||
std::string interfacePropertyName;
|
std::string interfacePropertyName;
|
||||||
|
|
||||||
if (propertyName == "INTERFACE_INCLUDE_DIRECTORIES"
|
#define POPULATE_INTERFACE_PROPERTY_NAME(prop) \
|
||||||
|| propertyName == "INCLUDE_DIRECTORIES")
|
if (propertyName == #prop || propertyName == "INTERFACE_" #prop) \
|
||||||
{
|
{ \
|
||||||
interfacePropertyName = "INTERFACE_INCLUDE_DIRECTORIES";
|
interfacePropertyName = "INTERFACE_" #prop; \
|
||||||
}
|
} \
|
||||||
else if (propertyName == "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES")
|
else
|
||||||
{
|
|
||||||
interfacePropertyName = "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES";
|
CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(POPULATE_INTERFACE_PROPERTY_NAME)
|
||||||
}
|
// Note that the above macro terminates with an else
|
||||||
else if (propertyName == "INTERFACE_COMPILE_DEFINITIONS"
|
/* else */ if (strncmp(propertyName.c_str(),
|
||||||
|| propertyName == "COMPILE_DEFINITIONS"
|
"COMPILE_DEFINITIONS_", 20) == 0)
|
||||||
|| strncmp(propertyName.c_str(), "COMPILE_DEFINITIONS_", 20) == 0)
|
|
||||||
{
|
{
|
||||||
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
|
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
|
||||||
}
|
}
|
||||||
else if (propertyName == "INTERFACE_COMPILE_OPTIONS"
|
#undef POPULATE_INTERFACE_PROPERTY_NAME
|
||||||
|| propertyName == "COMPILE_OPTIONS")
|
|
||||||
{
|
|
||||||
interfacePropertyName = "INTERFACE_COMPILE_OPTIONS";
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTarget const* headTarget = context->HeadTarget
|
cmTarget const* headTarget = context->HeadTarget
|
||||||
? context->HeadTarget : target;
|
? context->HeadTarget : target;
|
||||||
|
|
Loading…
Reference in New Issue