diff options
author | Brad King <brad.king@kitware.com> | 2014-06-12 20:15:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-23 13:14:45 (GMT) |
commit | bd9b667bbe83b112a9ea4448605fac980d2d8a68 (patch) | |
tree | bdb19e46c5e54001516474229a888bad8477ac74 /Source | |
parent | 06328dd58ee3de5d716b0d2b259927da2e173c1d (diff) | |
download | CMake-bd9b667bbe83b112a9ea4448605fac980d2d8a68.zip CMake-bd9b667bbe83b112a9ea4448605fac980d2d8a68.tar.gz CMake-bd9b667bbe83b112a9ea4448605fac980d2d8a68.tar.bz2 |
cmComputeLinkInformation: Remove 'head' argument
It is only ever constructed with the current target as its own 'head'.
Co-Author: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 12 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.h | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 13 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.h | 4 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 2 |
5 files changed, 13 insertions, 22 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 336097b..1aabdeb 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -172,12 +172,10 @@ satisfy dependencies. //---------------------------------------------------------------------------- cmComputeLinkDepends -::cmComputeLinkDepends(cmTarget const* target, const std::string& config, - cmTarget const* head) +::cmComputeLinkDepends(cmTarget const* target, const std::string& config) { // Store context information. this->Target = target; - this->HeadTarget = head; this->Makefile = this->Target->GetMakefile(); this->LocalGenerator = this->Makefile->GetLocalGenerator(); this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); @@ -356,7 +354,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) { // Follow the target dependencies. if(cmTarget::LinkInterface const* iface = - entry.Target->GetLinkInterface(this->Config, this->HeadTarget)) + entry.Target->GetLinkInterface(this->Config, this->Target)) { const bool isIface = entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY; @@ -455,7 +453,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) if(entry.Target) { 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. this->FollowSharedDeps(index, iface, true); @@ -544,7 +542,7 @@ void cmComputeLinkDepends::AddDirectLinkEntries() { // Add direct link dependencies in this configuration. cmTarget::LinkImplementation const* impl = - this->Target->GetLinkImplementation(this->Config, this->HeadTarget); + this->Target->GetLinkImplementation(this->Config, this->Target); this->AddLinkEntries(-1, impl->Libraries); for(std::vector<std::string>::const_iterator wi = impl->WrongConfigLibraries.begin(); @@ -955,7 +953,7 @@ int cmComputeLinkDepends::ComputeComponentCount(NodeList const& nl) if(cmTarget const* target = this->EntryList[*ni].Target) { if(cmTarget::LinkInterface const* iface = - target->GetLinkInterface(this->Config, this->HeadTarget)) + target->GetLinkInterface(this->Config, this->Target)) { if(iface->Multiplicity > count) { diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 13fc993..440dc0d 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -32,8 +32,7 @@ class cmake; class cmComputeLinkDepends { public: - cmComputeLinkDepends(cmTarget const* target, const std::string& config, - cmTarget const* head); + cmComputeLinkDepends(cmTarget const* target, const std::string& config); ~cmComputeLinkDepends(); // Basic information about each link item. @@ -60,7 +59,6 @@ private: // Context information. cmTarget const* Target; - cmTarget const* HeadTarget; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; cmGlobalGenerator const* GlobalGenerator; diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 0ce04a5..bcafe2d 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -239,12 +239,10 @@ because this need be done only for shared libraries without soname-s. //---------------------------------------------------------------------------- cmComputeLinkInformation -::cmComputeLinkInformation(cmTarget const* target, const std::string& config, - cmTarget const* headTarget) +::cmComputeLinkInformation(cmTarget const* target, const std::string& config) { // Store context information. this->Target = target; - this->HeadTarget = headTarget; this->Makefile = this->Target->GetMakefile(); this->LocalGenerator = this->Makefile->GetLocalGenerator(); this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); @@ -267,7 +265,7 @@ cmComputeLinkInformation this->OrderDependentRPath = 0; // 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()) { // 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. - cmComputeLinkDepends cld(this->Target, this->Config, - this->HeadTarget); + cmComputeLinkDepends cld(this->Target, this->Config); cld.SetOldLinkDirMode(this->OldLinkDirMode); cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute(); @@ -573,7 +570,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo() { // The link closure lists all languages whose implicit info is needed. cmTarget::LinkClosure const* lc=this->Target->GetLinkClosure(this->Config, - this->HeadTarget); + this->Target); for(std::vector<std::string>::const_iterator li = lc->Languages.begin(); 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. { 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(); li != lc->Languages.end(); ++li) { diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index e345fe2..e5d674a 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -29,8 +29,7 @@ class cmOrderDirectories; class cmComputeLinkInformation { public: - cmComputeLinkInformation(cmTarget const* target, const std::string& config, - cmTarget const* headTarget); + cmComputeLinkInformation(cmTarget const* target, const std::string& config); ~cmComputeLinkInformation(); bool Compute(); @@ -75,7 +74,6 @@ private: // Context information. cmTarget const* Target; - cmTarget const* HeadTarget; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; cmGlobalGenerator* GlobalGenerator; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f6a92bd..32b0777 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6953,7 +6953,7 @@ cmTarget::GetLinkInformation(const std::string& config) const { // Compute information for this configuration. cmComputeLinkInformation* info = - new cmComputeLinkInformation(this, config, this); + new cmComputeLinkInformation(this, config); if(!info || !info->Compute()) { delete info; |