GenEx: Add COMPATIBLE_INTERFACE_ implementation comments

This commit is contained in:
Brad King
2024-04-11 14:49:23 -04:00
parent 541a788264
commit 86f99c5f6d

View File

@@ -2950,6 +2950,19 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return std::string();
}
// Properties named by COMPATIBLE_INTERFACE_ properties combine over
// the transitive link closure as a single order-independent value.
// Imported targets do not themselves have a defined value for these
// properties, but they can contribute to the value of a non-imported
// dependent.
//
// For COMPATIBLE_INTERFACE_{BOOL,STRING}:
// * If set on this target, use the value directly. It is checked
// elsewhere for consistency over the transitive link closure.
// * If not set on this target, compute the value from the closure.
//
// For COMPATIBLE_INTERFACE_NUMBER_{MAX,MIN} we always compute the value
// from this target and the transitive link closure to get the max or min.
if (!haveProp && !target->IsImported() &&
target->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
if (target->IsLinkInterfaceDependentBoolProperty(propertyName,
@@ -2989,7 +3002,6 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return propContent ? propContent : "";
}
}
if (!target->IsImported() && dagCheckerParent &&
!dagCheckerParent->EvaluatingLinkLibraries()) {
if (target->IsLinkInterfaceDependentNumberMinProperty(propertyName,
@@ -3010,6 +3022,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
}
// Some properties, such as usage requirements, combine over the
// transitive link closure as an ordered list.
if (!interfacePropertyName.empty()) {
result = cmGeneratorExpression::StripEmptyListElements(
this->EvaluateDependentExpression(result, context->LG, context, target,