diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-04 17:19:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-05 16:20:49 (GMT) |
commit | 4329a71c128f8a8fca48a8827226d09f61fcbe85 (patch) | |
tree | e0ee12c12b6f03407a8d0b48064e8541da65a64a /Source | |
parent | c93230ac3838231f2f44986e224da1bdaf9a7dfe (diff) | |
download | CMake-4329a71c128f8a8fca48a8827226d09f61fcbe85.zip CMake-4329a71c128f8a8fca48a8827226d09f61fcbe85.tar.gz CMake-4329a71c128f8a8fca48a8827226d09f61fcbe85.tar.bz2 |
cmComputeLinkDepends: Port to cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 17 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.h | 6 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 2 |
3 files changed, 14 insertions, 11 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index abd9877..8ba8847 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -173,18 +173,19 @@ items that we know the linker will re-use automatically (shared libs). //---------------------------------------------------------------------------- cmComputeLinkDepends -::cmComputeLinkDepends(cmTarget const* target, const std::string& config) +::cmComputeLinkDepends(const cmGeneratorTarget* target, + const std::string& config) { // Store context information. this->Target = target; - this->Makefile = this->Target->GetMakefile(); + this->Makefile = this->Target->Target->GetMakefile(); this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); // The configuration being linked. this->HasConfig = !config.empty(); this->Config = (this->HasConfig)? config : std::string(); - this->LinkType = this->Target->ComputeLinkType(this->Config); + this->LinkType = this->Target->Target->ComputeLinkType(this->Config); // Enable debug mode if requested. this->DebugMode = this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE"); @@ -363,7 +364,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) { // Follow the target dependencies. if(cmTarget::LinkInterface const* iface = - entry.Target->GetLinkInterface(this->Config, this->Target)) + entry.Target->GetLinkInterface(this->Config, this->Target->Target)) { const bool isIface = entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY; @@ -461,7 +462,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) if(entry.Target) { if(cmTarget::LinkInterface const* iface = - entry.Target->GetLinkInterface(this->Config, this->Target)) + entry.Target->GetLinkInterface(this->Config, this->Target->Target)) { // Follow public and private dependencies transitively. this->FollowSharedDeps(index, iface, true); @@ -552,7 +553,7 @@ void cmComputeLinkDepends::AddDirectLinkEntries() { // Add direct link dependencies in this configuration. cmTarget::LinkImplementation const* impl = - this->Target->GetLinkImplementation(this->Config); + this->Target->Target->GetLinkImplementation(this->Config); this->AddLinkEntries(-1, impl->Libraries); for(std::vector<cmLinkItem>::const_iterator wi = impl->WrongConfigLibraries.begin(); @@ -634,7 +635,7 @@ cmTarget const* cmComputeLinkDepends::FindTargetToLink(int depender_index, const std::string& name) { // Look for a target in the scope of the depender. - cmTarget const* from = this->Target; + cmTarget const* from = this->Target->Target; if(depender_index >= 0) { if(cmTarget const* depender = this->EntryList[depender_index].Target) @@ -932,7 +933,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->Target)) + target->GetLinkInterface(this->Config, this->Target->Target)) { if(iface->Multiplicity > count) { diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 51a08c5..b925a4f 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -22,6 +22,7 @@ class cmComputeComponentGraph; class cmGlobalGenerator; class cmMakefile; +class cmGeneratorTarget; class cmTarget; class cmake; @@ -31,7 +32,8 @@ class cmake; class cmComputeLinkDepends { public: - cmComputeLinkDepends(cmTarget const* target, const std::string& config); + cmComputeLinkDepends(cmGeneratorTarget const* target, + const std::string& config); ~cmComputeLinkDepends(); // Basic information about each link item. @@ -57,7 +59,7 @@ public: private: // Context information. - cmTarget const* Target; + cmGeneratorTarget const* Target; cmMakefile* Makefile; cmGlobalGenerator const* GlobalGenerator; cmake* CMakeInstance; diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index f00a8cf..7a516e2 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -497,7 +497,7 @@ bool cmComputeLinkInformation::Compute() } // Compute the ordered link line items. - cmComputeLinkDepends cld(this->Target->Target, this->Config); + cmComputeLinkDepends cld(this->Target, this->Config); cld.SetOldLinkDirMode(this->OldLinkDirMode); cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute(); |