cmGeneratorTarget: Clarify logic recognizing explicit link interface

This commit is contained in:
Brad King
2021-06-24 13:38:05 -04:00
parent ff97944806
commit d9e4b47432
+6 -6
View File
@@ -6916,20 +6916,20 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries(
return;
}
iface.Exists = true;
// If CMP0022 is NEW then the plain tll signature sets the
// INTERFACE_LINK_LIBRARIES property. Even if the project
// clears it, the link interface is still explicit.
iface.Explicit = cmp0022NEW || explicitLibraries;
if (explicitLibraries) {
// The interface libraries have been explicitly set.
this->ExpandLinkItems(linkIfaceProp, *explicitLibraries, config,
headTarget, usage_requirements_only, iface);
return;
}
// If CMP0022 is NEW then the plain tll signature sets the
// INTERFACE_LINK_LIBRARIES, so if we get here then the project
// cleared the property explicitly and we should not fall back
// to the link implementation.
if (cmp0022NEW) {
// If the link interface is explicit, do not fall back to the link impl.
if (iface.Explicit) {
return;
}