cmTarget: Re-arrange the ComputeLinkInterface method.
Arrange the logic so that the part which deals with libraries only is at the top. In a follow-up commit, this will be split into two methods. Ensure that the explanatory CMP0022 comment is only present in one location.
This commit is contained in:
parent
326d07d27e
commit
3bcb197c11
@ -5366,7 +5366,22 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
|
|||||||
false,
|
false,
|
||||||
headTarget,
|
headTarget,
|
||||||
this, &dagChecker), iface.Libraries);
|
this, &dagChecker), iface.Libraries);
|
||||||
|
}
|
||||||
|
else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
|
||||||
|
|| this->PolicyStatusCMP0022 == cmPolicies::OLD)
|
||||||
|
// 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.
|
||||||
|
{
|
||||||
|
// The link implementation is the default link interface.
|
||||||
|
LinkImplementation const* impl = this->GetLinkImplementation(config,
|
||||||
|
headTarget);
|
||||||
|
iface.Libraries = impl->Libraries;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(explicitLibraries)
|
||||||
|
{
|
||||||
if(this->GetType() == cmTarget::SHARED_LIBRARY
|
if(this->GetType() == cmTarget::SHARED_LIBRARY
|
||||||
|| this->GetType() == cmTarget::STATIC_LIBRARY
|
|| this->GetType() == cmTarget::STATIC_LIBRARY
|
||||||
|| this->GetType() == cmTarget::INTERFACE_LIBRARY)
|
|| this->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||||
@ -5415,16 +5430,11 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
|
|||||||
}
|
}
|
||||||
else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
|
else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
|
||||||
|| this->PolicyStatusCMP0022 == cmPolicies::OLD)
|
|| this->PolicyStatusCMP0022 == cmPolicies::OLD)
|
||||||
// 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.
|
|
||||||
{
|
{
|
||||||
// The link implementation is the default link interface.
|
// The link implementation is the default link interface.
|
||||||
LinkImplementation const* impl = this->GetLinkImplementation(config,
|
LinkImplementation const* impl = this->GetLinkImplementation(config,
|
||||||
headTarget);
|
headTarget);
|
||||||
iface.ImplementationIsInterface = true;
|
iface.ImplementationIsInterface = true;
|
||||||
iface.Libraries = impl->Libraries;
|
|
||||||
iface.WrongConfigLibraries = impl->WrongConfigLibraries;
|
iface.WrongConfigLibraries = impl->WrongConfigLibraries;
|
||||||
if(this->LinkLanguagePropagatesToDependents())
|
if(this->LinkLanguagePropagatesToDependents())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user