diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-13 14:11:07 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-02-24 15:43:24 (GMT) |
commit | 3bcb197c11be54445db3282e9811dc29f2321c70 (patch) | |
tree | 875c37eb6a23175f6f07f5bec6821ba2eeecef6f /Source | |
parent | 326d07d27ec173d3e67a314010764ebbe7b2aa9c (diff) | |
download | CMake-3bcb197c11be54445db3282e9811dc29f2321c70.zip CMake-3bcb197c11be54445db3282e9811dc29f2321c70.tar.gz CMake-3bcb197c11be54445db3282e9811dc29f2321c70.tar.bz2 |
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.
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()) { |