diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 219560e..63c5908 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5515,11 +5515,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } } } - if(this->LinkLanguagePropagatesToDependents()) - { - // Targets using this archive need its language runtime libraries. - iface.Languages = impl->Languages; - } } } } @@ -5536,11 +5531,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, iface.ImplementationIsInterface = true; iface.Libraries = impl->Libraries; iface.WrongConfigLibraries = impl->WrongConfigLibraries; - if(this->LinkLanguagePropagatesToDependents()) - { - // Targets using this archive need its language runtime libraries. - iface.Languages = impl->Languages; - } if(this->PolicyStatusCMP0022 == cmPolicies::WARN && !this->Internal->PolicyWarnedCMP0022) @@ -5607,6 +5597,16 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } } + if(this->LinkLanguagePropagatesToDependents()) + { + // Targets using this archive need its language runtime libraries. + if(LinkImplementation const* impl = + this->GetLinkImplementation(config, headTarget)) + { + iface.Languages = impl->Languages; + } + } + if(this->GetType() == cmTarget::STATIC_LIBRARY) { // How many repetitions are needed if this library has cyclic |