cmComputeLinkInformation: Remove 'head' argument
It is only ever constructed with the current target as its own 'head'. Co-Author: Stephen Kelly <steveire@gmail.com>
This commit is contained in:
parent
06328dd58e
commit
bd9b667bbe
|
@ -172,12 +172,10 @@ satisfy dependencies.
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmComputeLinkDepends
|
cmComputeLinkDepends
|
||||||
::cmComputeLinkDepends(cmTarget const* target, const std::string& config,
|
::cmComputeLinkDepends(cmTarget const* target, const std::string& config)
|
||||||
cmTarget const* head)
|
|
||||||
{
|
{
|
||||||
// Store context information.
|
// Store context information.
|
||||||
this->Target = target;
|
this->Target = target;
|
||||||
this->HeadTarget = head;
|
|
||||||
this->Makefile = this->Target->GetMakefile();
|
this->Makefile = this->Target->GetMakefile();
|
||||||
this->LocalGenerator = this->Makefile->GetLocalGenerator();
|
this->LocalGenerator = this->Makefile->GetLocalGenerator();
|
||||||
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
|
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
|
||||||
|
@ -356,7 +354,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
|
||||||
{
|
{
|
||||||
// Follow the target dependencies.
|
// Follow the target dependencies.
|
||||||
if(cmTarget::LinkInterface const* iface =
|
if(cmTarget::LinkInterface const* iface =
|
||||||
entry.Target->GetLinkInterface(this->Config, this->HeadTarget))
|
entry.Target->GetLinkInterface(this->Config, this->Target))
|
||||||
{
|
{
|
||||||
const bool isIface =
|
const bool isIface =
|
||||||
entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY;
|
entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY;
|
||||||
|
@ -455,7 +453,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
|
||||||
if(entry.Target)
|
if(entry.Target)
|
||||||
{
|
{
|
||||||
if(cmTarget::LinkInterface const* iface =
|
if(cmTarget::LinkInterface const* iface =
|
||||||
entry.Target->GetLinkInterface(this->Config, this->HeadTarget))
|
entry.Target->GetLinkInterface(this->Config, this->Target))
|
||||||
{
|
{
|
||||||
// Follow public and private dependencies transitively.
|
// Follow public and private dependencies transitively.
|
||||||
this->FollowSharedDeps(index, iface, true);
|
this->FollowSharedDeps(index, iface, true);
|
||||||
|
@ -544,7 +542,7 @@ void cmComputeLinkDepends::AddDirectLinkEntries()
|
||||||
{
|
{
|
||||||
// Add direct link dependencies in this configuration.
|
// Add direct link dependencies in this configuration.
|
||||||
cmTarget::LinkImplementation const* impl =
|
cmTarget::LinkImplementation const* impl =
|
||||||
this->Target->GetLinkImplementation(this->Config, this->HeadTarget);
|
this->Target->GetLinkImplementation(this->Config, this->Target);
|
||||||
this->AddLinkEntries(-1, impl->Libraries);
|
this->AddLinkEntries(-1, impl->Libraries);
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
wi = impl->WrongConfigLibraries.begin();
|
wi = impl->WrongConfigLibraries.begin();
|
||||||
|
@ -955,7 +953,7 @@ int cmComputeLinkDepends::ComputeComponentCount(NodeList const& nl)
|
||||||
if(cmTarget const* target = this->EntryList[*ni].Target)
|
if(cmTarget const* target = this->EntryList[*ni].Target)
|
||||||
{
|
{
|
||||||
if(cmTarget::LinkInterface const* iface =
|
if(cmTarget::LinkInterface const* iface =
|
||||||
target->GetLinkInterface(this->Config, this->HeadTarget))
|
target->GetLinkInterface(this->Config, this->Target))
|
||||||
{
|
{
|
||||||
if(iface->Multiplicity > count)
|
if(iface->Multiplicity > count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,8 +32,7 @@ class cmake;
|
||||||
class cmComputeLinkDepends
|
class cmComputeLinkDepends
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmComputeLinkDepends(cmTarget const* target, const std::string& config,
|
cmComputeLinkDepends(cmTarget const* target, const std::string& config);
|
||||||
cmTarget const* head);
|
|
||||||
~cmComputeLinkDepends();
|
~cmComputeLinkDepends();
|
||||||
|
|
||||||
// Basic information about each link item.
|
// Basic information about each link item.
|
||||||
|
@ -60,7 +59,6 @@ private:
|
||||||
|
|
||||||
// Context information.
|
// Context information.
|
||||||
cmTarget const* Target;
|
cmTarget const* Target;
|
||||||
cmTarget const* HeadTarget;
|
|
||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
cmLocalGenerator* LocalGenerator;
|
cmLocalGenerator* LocalGenerator;
|
||||||
cmGlobalGenerator const* GlobalGenerator;
|
cmGlobalGenerator const* GlobalGenerator;
|
||||||
|
|
|
@ -239,12 +239,10 @@ because this need be done only for shared libraries without soname-s.
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmComputeLinkInformation
|
cmComputeLinkInformation
|
||||||
::cmComputeLinkInformation(cmTarget const* target, const std::string& config,
|
::cmComputeLinkInformation(cmTarget const* target, const std::string& config)
|
||||||
cmTarget const* headTarget)
|
|
||||||
{
|
{
|
||||||
// Store context information.
|
// Store context information.
|
||||||
this->Target = target;
|
this->Target = target;
|
||||||
this->HeadTarget = headTarget;
|
|
||||||
this->Makefile = this->Target->GetMakefile();
|
this->Makefile = this->Target->GetMakefile();
|
||||||
this->LocalGenerator = this->Makefile->GetLocalGenerator();
|
this->LocalGenerator = this->Makefile->GetLocalGenerator();
|
||||||
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
|
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
|
||||||
|
@ -267,7 +265,7 @@ cmComputeLinkInformation
|
||||||
this->OrderDependentRPath = 0;
|
this->OrderDependentRPath = 0;
|
||||||
|
|
||||||
// Get the language used for linking this target.
|
// Get the language used for linking this target.
|
||||||
this->LinkLanguage = this->Target->GetLinkerLanguage(config, headTarget);
|
this->LinkLanguage = this->Target->GetLinkerLanguage(config);
|
||||||
if(this->LinkLanguage.empty())
|
if(this->LinkLanguage.empty())
|
||||||
{
|
{
|
||||||
// The Compute method will do nothing, so skip the rest of the
|
// The Compute method will do nothing, so skip the rest of the
|
||||||
|
@ -505,8 +503,7 @@ bool cmComputeLinkInformation::Compute()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the ordered link line items.
|
// Compute the ordered link line items.
|
||||||
cmComputeLinkDepends cld(this->Target, this->Config,
|
cmComputeLinkDepends cld(this->Target, this->Config);
|
||||||
this->HeadTarget);
|
|
||||||
cld.SetOldLinkDirMode(this->OldLinkDirMode);
|
cld.SetOldLinkDirMode(this->OldLinkDirMode);
|
||||||
cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
|
cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
|
||||||
|
|
||||||
|
@ -573,7 +570,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo()
|
||||||
{
|
{
|
||||||
// The link closure lists all languages whose implicit info is needed.
|
// The link closure lists all languages whose implicit info is needed.
|
||||||
cmTarget::LinkClosure const* lc=this->Target->GetLinkClosure(this->Config,
|
cmTarget::LinkClosure const* lc=this->Target->GetLinkClosure(this->Config,
|
||||||
this->HeadTarget);
|
this->Target);
|
||||||
for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
|
for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
|
||||||
li != lc->Languages.end(); ++li)
|
li != lc->Languages.end(); ++li)
|
||||||
{
|
{
|
||||||
|
@ -1972,7 +1969,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
|
||||||
// present. This is done even when skipping rpath support.
|
// present. This is done even when skipping rpath support.
|
||||||
{
|
{
|
||||||
cmTarget::LinkClosure const* lc =
|
cmTarget::LinkClosure const* lc =
|
||||||
this->Target->GetLinkClosure(this->Config, this->HeadTarget);
|
this->Target->GetLinkClosure(this->Config, this->Target);
|
||||||
for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
|
for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
|
||||||
li != lc->Languages.end(); ++li)
|
li != lc->Languages.end(); ++li)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,8 +29,7 @@ class cmOrderDirectories;
|
||||||
class cmComputeLinkInformation
|
class cmComputeLinkInformation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmComputeLinkInformation(cmTarget const* target, const std::string& config,
|
cmComputeLinkInformation(cmTarget const* target, const std::string& config);
|
||||||
cmTarget const* headTarget);
|
|
||||||
~cmComputeLinkInformation();
|
~cmComputeLinkInformation();
|
||||||
bool Compute();
|
bool Compute();
|
||||||
|
|
||||||
|
@ -75,7 +74,6 @@ private:
|
||||||
|
|
||||||
// Context information.
|
// Context information.
|
||||||
cmTarget const* Target;
|
cmTarget const* Target;
|
||||||
cmTarget const* HeadTarget;
|
|
||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
cmLocalGenerator* LocalGenerator;
|
cmLocalGenerator* LocalGenerator;
|
||||||
cmGlobalGenerator* GlobalGenerator;
|
cmGlobalGenerator* GlobalGenerator;
|
||||||
|
|
|
@ -6953,7 +6953,7 @@ cmTarget::GetLinkInformation(const std::string& config) const
|
||||||
{
|
{
|
||||||
// Compute information for this configuration.
|
// Compute information for this configuration.
|
||||||
cmComputeLinkInformation* info =
|
cmComputeLinkInformation* info =
|
||||||
new cmComputeLinkInformation(this, config, this);
|
new cmComputeLinkInformation(this, config);
|
||||||
if(!info || !info->Compute())
|
if(!info || !info->Compute())
|
||||||
{
|
{
|
||||||
delete info;
|
delete info;
|
||||||
|
|
Loading…
Reference in New Issue