diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 5e9627bd4..4b7faa7be 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -554,7 +554,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index, void cmComputeLinkDepends::AddDirectLinkEntries() { // Add direct link dependencies in this configuration. - cmTarget::LinkImplementation const* impl = + cmLinkImplementation const* impl = this->Target->Target->GetLinkImplementation(this->Config); this->AddLinkEntries(-1, impl->Libraries); for(std::vector::const_iterator diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 83b2a0ede..8ed4ddb30 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -252,7 +252,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) } } - cmTarget::LinkImplementation const* impl = + cmLinkImplementation const* impl = depender->Target->GetLinkImplementation(*it); // A target should not depend on itself. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c499cd9d0..057aa07a0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1335,7 +1335,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, { // Get languages built in this target. UNORDERED_SET languages; - cmTarget::LinkImplementation const* impl = + cmLinkImplementation const* impl = this->Target->GetLinkImplementation(config); assert(impl); for(std::vector::const_iterator li = impl->Languages.begin(); @@ -4057,7 +4057,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, } if (this->GetType() != cmTarget::INTERFACE_LIBRARY) { - cmTarget::LinkImplementation const* impl = + cmLinkImplementation const* impl = this->Target->GetLinkImplementation(config); for(std::vector::const_iterator li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) @@ -4098,7 +4098,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, if(this->Target->LinkLanguagePropagatesToDependents()) { // Targets using this archive need its language runtime libraries. - if(cmTarget::LinkImplementation const* impl = + if(cmLinkImplementation const* impl = this->Target->GetLinkImplementation(config)) { iface.Languages = impl->Languages; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 87c61dd25..f78a8a194 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1383,7 +1383,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget) if(llang.empty()) { return; } // If the language is compiled as a source trust Xcode to link with it. - cmTarget::LinkImplementation const* impl = + cmLinkImplementation const* impl = cmtarget.GetLinkImplementation("NOCONFIG"); for(std::vector::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h index 91220b8c7..b2336f0d7 100644 --- a/Source/cmLinkItem.h +++ b/Source/cmLinkItem.h @@ -101,4 +101,10 @@ struct cmHeadToLinkInterfaceMap: { }; +struct cmLinkImplementation: public cmLinkImplementationLibraries +{ + // Languages whose runtime libraries must be linked. + std::vector Languages; +}; + #endif diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ea03ffe20..c007994cf 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -96,7 +96,7 @@ public: ImportInfoMapType ImportInfoMap; // Cache link implementation computation from each configuration. - struct OptionalLinkImplementation: public cmTarget::LinkImplementation + struct OptionalLinkImplementation: public cmLinkImplementation { OptionalLinkImplementation(): LibrariesDone(false), LanguagesDone(false), @@ -3584,7 +3584,7 @@ void cmTargetInternals::AddInterfaceEntries( } //---------------------------------------------------------------------------- -cmTarget::LinkImplementation const* +const cmLinkImplementation * cmTarget::GetLinkImplementation(const std::string& config) const { // There is no link implementation for imported targets. diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 34a75eac8..19cc220ff 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -231,12 +231,7 @@ public: void GetObjectLibrariesCMP0026(std::vector& objlibs) const; - struct LinkImplementation: public cmLinkImplementationLibraries - { - // Languages whose runtime libraries must be linked. - std::vector Languages; - }; - LinkImplementation const* + cmLinkImplementation const* GetLinkImplementation(const std::string& config) const; cmLinkImplementationLibraries const*