Explorar el Código

cmGeneratorTarget: Move GetFullNameComponents from cmTarget.

Stephen Kelly hace 10 años
padre
commit
62720e44be

+ 10 - 0
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

+ 5 - 0
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;

+ 1 - 1
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");

+ 1 - 1
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"))

+ 0 - 9
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

+ 0 - 4
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;