diff options
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
| -rw-r--r-- | Source/cmGeneratorTarget.cxx | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 057aa07..44fac1d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1336,7 +1336,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, // Get languages built in this target. UNORDERED_SET<std::string> languages; cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config); + this->GetLinkImplementation(config); assert(impl); for(std::vector<std::string>::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) @@ -4058,7 +4058,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, if (this->GetType() != cmTarget::INTERFACE_LIBRARY) { cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config); + this->GetLinkImplementation(config); for(std::vector<cmLinkImplItem>::const_iterator li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) { @@ -4099,7 +4099,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, { // Targets using this archive need its language runtime libraries. if(cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config)) + this->GetLinkImplementation(config)) { iface.Languages = impl->Languages; } @@ -4389,3 +4389,28 @@ cmGeneratorTarget::GetHeadToLinkInterfaceUsageRequirementsMap( std::string CONFIG = cmSystemTools::UpperCase(config); return this->LinkInterfaceUsageRequirementsOnlyMap[CONFIG]; } + +//---------------------------------------------------------------------------- +const cmLinkImplementation * +cmGeneratorTarget::GetLinkImplementation(const std::string& config) const +{ + // There is no link implementation for imported targets. + if(this->Target->IsImported()) + { + return 0; + } + + cmOptionalLinkImplementation& impl = this->Target->GetLinkImplMap(config); + if(!impl.LibrariesDone) + { + impl.LibrariesDone = true; + this->Target->ComputeLinkImplementationLibraries(config, impl, + this->Target); + } + if(!impl.LanguagesDone) + { + impl.LanguagesDone = true; + this->Target->ComputeLinkImplementationLanguages(config, impl); + } + return &impl; +} |
