cmLinkImplementationLibraries: Move to namespace scope.

This commit is contained in:
Stephen Kelly 2015-08-04 19:55:46 +02:00
parent d9da6ee29f
commit 10040601a2
5 changed files with 23 additions and 22 deletions

View File

@ -1120,7 +1120,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
} }
else if(!interfacePropertyName.empty()) else if(!interfacePropertyName.empty())
{ {
if(cmTarget::LinkImplementationLibraries const* impl = if(cmLinkImplementationLibraries const* impl =
target->GetLinkImplementationLibraries(context->Config)) target->GetLinkImplementationLibraries(context->Config))
{ {
linkedTargetsContent = linkedTargetsContent =

View File

@ -1506,7 +1506,7 @@ cmGeneratorTarget::GetLinkImplementationClosure(
tgts.Done = true; tgts.Done = true;
std::set<cmTarget const*> emitted; std::set<cmTarget const*> emitted;
cmTarget::LinkImplementationLibraries const* impl cmLinkImplementationLibraries const* impl
= this->Target->GetLinkImplementationLibraries(config); = this->Target->GetLinkImplementationLibraries(config);
for(std::vector<cmLinkImplItem>::const_iterator for(std::vector<cmLinkImplItem>::const_iterator

View File

@ -44,4 +44,16 @@ public:
bool FromGenex; bool FromGenex;
}; };
/** The link implementation specifies the direct library
dependencies needed by the object files of the target. */
struct cmLinkImplementationLibraries
{
// Libraries linked directly in this configuration.
std::vector<cmLinkImplItem> Libraries;
// Libraries linked directly in other configurations.
// Needed only for OLD behavior of CMP0003.
std::vector<cmLinkItem> WrongConfigLibraries;
};
#endif #endif

View File

@ -3381,7 +3381,7 @@ bool cmTarget::HaveBuildTreeRPATH(const std::string& config) const
{ {
return false; return false;
} }
if(LinkImplementationLibraries const* impl = if(cmLinkImplementationLibraries const* impl =
this->GetLinkImplementationLibraries(config)) this->GetLinkImplementationLibraries(config))
{ {
return !impl->Libraries.empty(); return !impl->Libraries.empty();
@ -4331,7 +4331,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
// to the link implementation. // to the link implementation.
{ {
// The link implementation is the default link interface. // The link implementation is the default link interface.
cmTarget::LinkImplementationLibraries const* impl = cmLinkImplementationLibraries const* impl =
thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget);
iface.Libraries.insert(iface.Libraries.end(), iface.Libraries.insert(iface.Libraries.end(),
impl->Libraries.begin(), impl->Libraries.end()); impl->Libraries.begin(), impl->Libraries.end());
@ -4431,7 +4431,7 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
|| thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD)
{ {
// The link implementation is the default link interface. // The link implementation is the default link interface.
cmTarget::LinkImplementationLibraries const* cmLinkImplementationLibraries const*
impl = thisTarget->GetLinkImplementationLibrariesInternal(config, impl = thisTarget->GetLinkImplementationLibrariesInternal(config,
headTarget); headTarget);
iface.ImplementationIsInterface = true; iface.ImplementationIsInterface = true;
@ -4482,7 +4482,7 @@ void cmTargetInternals::AddInterfaceEntries(
cmTarget const* thisTarget, std::string const& config, cmTarget const* thisTarget, std::string const& config,
std::string const& prop, std::vector<TargetPropertyEntry*>& entries) std::string const& prop, std::vector<TargetPropertyEntry*>& entries)
{ {
if(cmTarget::LinkImplementationLibraries const* impl = if(cmLinkImplementationLibraries const* impl =
thisTarget->GetLinkImplementationLibraries(config)) thisTarget->GetLinkImplementationLibraries(config))
{ {
for (std::vector<cmLinkImplItem>::const_iterator for (std::vector<cmLinkImplItem>::const_iterator
@ -4532,14 +4532,14 @@ cmTarget::GetLinkImplementation(const std::string& config) const
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmTarget::LinkImplementationLibraries const* cmLinkImplementationLibraries const*
cmTarget::GetLinkImplementationLibraries(const std::string& config) const cmTarget::GetLinkImplementationLibraries(const std::string& config) const
{ {
return this->GetLinkImplementationLibrariesInternal(config, this); return this->GetLinkImplementationLibrariesInternal(config, this);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmTarget::LinkImplementationLibraries const* cmLinkImplementationLibraries const*
cmTarget::GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget::GetLinkImplementationLibrariesInternal(const std::string& config,
cmTarget const* head) const cmTarget const* head) const
{ {

View File

@ -268,18 +268,7 @@ public:
cmTarget const* headTarget, cmTarget const* headTarget,
bool usage_requirements_only) const; bool usage_requirements_only) const;
/** The link implementation specifies the direct library struct LinkImplementation: public cmLinkImplementationLibraries
dependencies needed by the object files of the target. */
struct LinkImplementationLibraries
{
// Libraries linked directly in this configuration.
std::vector<cmLinkImplItem> Libraries;
// Libraries linked directly in other configurations.
// Needed only for OLD behavior of CMP0003.
std::vector<cmLinkItem> WrongConfigLibraries;
};
struct LinkImplementation: public LinkImplementationLibraries
{ {
// Languages whose runtime libraries must be linked. // Languages whose runtime libraries must be linked.
std::vector<std::string> Languages; std::vector<std::string> Languages;
@ -287,7 +276,7 @@ public:
LinkImplementation const* LinkImplementation const*
GetLinkImplementation(const std::string& config) const; GetLinkImplementation(const std::string& config) const;
LinkImplementationLibraries const* cmLinkImplementationLibraries const*
GetLinkImplementationLibraries(const std::string& config) const; GetLinkImplementationLibraries(const std::string& config) const;
cmTarget const* FindTargetToLink(std::string const& name) const; cmTarget const* FindTargetToLink(std::string const& name) const;
@ -606,7 +595,7 @@ private:
GetImportLinkInterface(const std::string& config, cmTarget const* head, GetImportLinkInterface(const std::string& config, cmTarget const* head,
bool usage_requirements_only) const; bool usage_requirements_only) const;
LinkImplementationLibraries const* cmLinkImplementationLibraries const*
GetLinkImplementationLibrariesInternal(const std::string& config, GetLinkImplementationLibrariesInternal(const std::string& config,
cmTarget const* head) const; cmTarget const* head) const;