diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-05 15:37:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-26 17:46:32 (GMT) |
commit | d4a24c0e953e0032a2e483917850b7f8f387bbb2 (patch) | |
tree | c4ee40746dcf84e0565a86da3293d20b7f8094e7 /Source | |
parent | 83981cf5931aaa2d9bbf4f99ea55c99736173fdf (diff) | |
download | CMake-d4a24c0e953e0032a2e483917850b7f8f387bbb2.zip CMake-d4a24c0e953e0032a2e483917850b7f8f387bbb2.tar.gz CMake-d4a24c0e953e0032a2e483917850b7f8f387bbb2.tar.bz2 |
cmGeneratorTarget: Move GetLinkImplementation from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 2 | ||||
-rw-r--r-- | Source/cmComputeTargetDepends.cxx | 3 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 31 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 24 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
7 files changed, 34 insertions, 34 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 4b7faa7..e774e16 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -555,7 +555,7 @@ void cmComputeLinkDepends::AddDirectLinkEntries() { // Add direct link dependencies in this configuration. cmLinkImplementation const* impl = - this->Target->Target->GetLinkImplementation(this->Config); + this->Target->GetLinkImplementation(this->Config); this->AddLinkEntries(-1, impl->Libraries); for(std::vector<cmLinkItem>::const_iterator wi = impl->WrongConfigLibraries.begin(); diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 8ed4ddb..9e37c35 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -252,8 +252,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) } } - cmLinkImplementation const* impl = - depender->Target->GetLinkImplementation(*it); + cmLinkImplementation const* impl = depender->GetLinkImplementation(*it); // A target should not depend on itself. emitted.insert(depender->GetName()); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 057aa07..44fac1d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1336,7 +1336,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, // Get languages built in this target. UNORDERED_SET<std::string> languages; cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config); + this->GetLinkImplementation(config); assert(impl); for(std::vector<std::string>::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) @@ -4058,7 +4058,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, if (this->GetType() != cmTarget::INTERFACE_LIBRARY) { cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config); + this->GetLinkImplementation(config); for(std::vector<cmLinkImplItem>::const_iterator li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) { @@ -4099,7 +4099,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, { // Targets using this archive need its language runtime libraries. if(cmLinkImplementation const* impl = - this->Target->GetLinkImplementation(config)) + this->GetLinkImplementation(config)) { iface.Languages = impl->Languages; } @@ -4389,3 +4389,28 @@ cmGeneratorTarget::GetHeadToLinkInterfaceUsageRequirementsMap( std::string CONFIG = cmSystemTools::UpperCase(config); return this->LinkInterfaceUsageRequirementsOnlyMap[CONFIG]; } + +//---------------------------------------------------------------------------- +const cmLinkImplementation * +cmGeneratorTarget::GetLinkImplementation(const std::string& config) const +{ + // There is no link implementation for imported targets. + if(this->Target->IsImported()) + { + return 0; + } + + cmOptionalLinkImplementation& impl = this->Target->GetLinkImplMap(config); + if(!impl.LibrariesDone) + { + impl.LibrariesDone = true; + this->Target->ComputeLinkImplementationLibraries(config, impl, + this->Target); + } + if(!impl.LanguagesDone) + { + impl.LanguagesDone = true; + this->Target->ComputeLinkImplementationLanguages(config, impl); + } + return &impl; +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 557eb17..58f5f6b 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -198,6 +198,9 @@ public: LinkClosure const* GetLinkClosure(const std::string& config) const; void ComputeLinkClosure(const std::string& config, LinkClosure& lc) const; + cmLinkImplementation const* + GetLinkImplementation(const std::string& config) const; + /** Full path with trailing slash to the top-level directory holding object files for this target. Includes the build time config name placeholder if needed for the generator. */ diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index f78a8a1..68fd06b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1384,7 +1384,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget) // If the language is compiled as a source trust Xcode to link with it. cmLinkImplementation const* impl = - cmtarget.GetLinkImplementation("NOCONFIG"); + gtgt->GetLinkImplementation("NOCONFIG"); for(std::vector<std::string>::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 2e37c08..a8ea0b8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3564,30 +3564,6 @@ void cmTargetInternals::AddInterfaceEntries( } } -//---------------------------------------------------------------------------- -const cmLinkImplementation * -cmTarget::GetLinkImplementation(const std::string& config) const -{ - // There is no link implementation for imported targets. - if(this->IsImported()) - { - return 0; - } - - cmOptionalLinkImplementation& impl = this->GetLinkImplMap(config); - if(!impl.LibrariesDone) - { - impl.LibrariesDone = true; - this->ComputeLinkImplementationLibraries(config, impl, this); - } - if(!impl.LanguagesDone) - { - impl.LanguagesDone = true; - this->ComputeLinkImplementationLanguages(config, impl); - } - return &impl; -} - cmOptionalLinkImplementation& cmTarget::GetLinkImplMap(std::string const& config) const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6411d12..1d353ab 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -231,9 +231,6 @@ public: void GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const; - cmLinkImplementation const* - GetLinkImplementation(const std::string& config) const; - cmLinkImplementationLibraries const* GetLinkImplementationLibraries(const std::string& config) const; |