From 62720e44be3e9f28e4c1e7d38206b2c51d34745e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Aug 2015 19:19:47 +0200 Subject: [PATCH] cmGeneratorTarget: Move GetFullNameComponents from cmTarget. --- Source/cmGeneratorTarget.cxx | 10 ++++++++++ Source/cmGeneratorTarget.h | 5 +++++ Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmNinjaNormalTargetGenerator.cxx | 2 +- Source/cmTarget.cxx | 9 --------- Source/cmTarget.h | 4 ---- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 648139078..4be034f27 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -890,6 +890,16 @@ std::string cmGeneratorTarget::GetSOName(const std::string& config) const } } +//---------------------------------------------------------------------------- +void cmGeneratorTarget::GetFullNameComponents(std::string& prefix, + std::string& base, + std::string& suffix, + const std::string& config, + bool implib) const +{ + this->Target->GetFullNameInternal(config, implib, prefix, base, suffix); +} + //---------------------------------------------------------------------------- std::string cmGeneratorTarget::GetModuleDefinitionFile(const std::string& config) const diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 9ecbbbea0..f96adadaf 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -118,6 +118,11 @@ public: /** Get the soname of the target. Allowed only for a shared library. */ std::string GetSOName(const std::string& config) const; + void GetFullNameComponents(std::string& prefix, + std::string& base, std::string& suffix, + const std::string& config="", + bool implib = false) const; + cmTarget* Target; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d7ae36dd0..03f6d8f53 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1940,7 +1940,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, std::string pnprefix; std::string pnbase; std::string pnsuffix; - target.GetFullNameComponents(pnprefix, pnbase, pnsuffix, configName); + gtgt->GetFullNameComponents(pnprefix, pnbase, pnsuffix, configName); const char* version = target.GetProperty("VERSION"); const char* soversion = target.GetProperty("SOVERSION"); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 2586b3198..c80f485dd 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -569,7 +569,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() std::string prefix; std::string base; std::string suffix; - target.GetFullNameComponents(prefix, base, suffix); + this->GetGeneratorTarget()->GetFullNameComponents(prefix, base, suffix); std::string dbg_suffix = ".dbg"; // TODO: Where to document? if (mf->GetDefinition("CMAKE_DEBUG_SYMBOL_SUFFIX")) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1183fe47b..0d9aa49bd 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3608,15 +3608,6 @@ cmTarget::GetFullNameImported(const std::string& config, bool implib) const this->ImportedGetFullPath(config, implib)); } -//---------------------------------------------------------------------------- -void cmTarget::GetFullNameComponents(std::string& prefix, std::string& base, - std::string& suffix, - const std::string& config, - bool implib) const -{ - this->GetFullNameInternal(config, implib, prefix, base, suffix); -} - //---------------------------------------------------------------------------- std::string cmTarget::ImportedGetFullPath(const std::string& config, bool implib) const diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 1aef7b36b..9962fdbc9 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -372,10 +372,6 @@ public: makefile. */ std::string GetFullName(const std::string& config="", bool implib = false) const; - void GetFullNameComponents(std::string& prefix, - std::string& base, std::string& suffix, - const std::string& config="", - bool implib = false) const; /** Whether this library has \@rpath and platform supports it. */ bool HasMacOSXRpathInstallNameDir(const std::string& config) const;