diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index bc57c51..edef7a0 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5366,7 +5366,22 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, false, headTarget, 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 || this->GetType() == cmTarget::STATIC_LIBRARY || this->GetType() == cmTarget::INTERFACE_LIBRARY) @@ -5415,16 +5430,11 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } 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.ImplementationIsInterface = true; - iface.Libraries = impl->Libraries; iface.WrongConfigLibraries = impl->WrongConfigLibraries; if(this->LinkLanguagePropagatesToDependents()) { |