فهرست منبع

ENH: Remove cmTarget::GetExecutableCleanNames

This method was redundant with GetExecutableNames.
Brad King 16 سال پیش
والد
کامیت
bcb9a479db
3فایلهای تغییر یافته به همراه7 افزوده شده و 41 حذف شده
  1. 7 21
      Source/cmMakefileExecutableTargetGenerator.cxx
  2. 0 12
      Source/cmTarget.cxx
  3. 0 8
      Source/cmTarget.h

+ 7 - 21
Source/cmMakefileExecutableTargetGenerator.cxx

@@ -253,38 +253,25 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   // Construct a list of files associated with this executable that
   // may need to be cleaned.
   std::vector<std::string> exeCleanFiles;
-  {
-  std::string cleanName;
-  std::string cleanRealName;
-  std::string cleanImportName;
-  std::string cleanPDBName;
-  this->Target->GetExecutableCleanNames
-    (cleanName, cleanRealName, cleanImportName, cleanPDBName,
-     this->LocalGenerator->ConfigurationName.c_str());
-
-  std::string cleanFullName = outpath + cleanName;
-  std::string cleanFullRealName = outpath + cleanRealName;
-  std::string cleanFullPDBName = outpath + cleanPDBName;
-  std::string cleanFullImportName = outpathImp + cleanImportName;
-  exeCleanFiles.push_back(this->Convert(cleanFullName.c_str(),
+  exeCleanFiles.push_back(this->Convert(targetFullPath.c_str(),
                                         cmLocalGenerator::START_OUTPUT,
                                         cmLocalGenerator::UNCHANGED));
 #ifdef _WIN32
   // There may be a manifest file for this target.  Add it to the
   // clean set just in case.
-  exeCleanFiles.push_back(this->Convert((cleanFullName+".manifest").c_str(),
+  exeCleanFiles.push_back(this->Convert((targetFullPath+".manifest").c_str(),
                                         cmLocalGenerator::START_OUTPUT,
                                         cmLocalGenerator::UNCHANGED));
 #endif
-  if(cleanRealName != cleanName)
+  if(targetNameReal != targetName)
     {
-    exeCleanFiles.push_back(this->Convert(cleanFullRealName.c_str(),
+    exeCleanFiles.push_back(this->Convert(targetFullPathReal.c_str(),
                                           cmLocalGenerator::START_OUTPUT,
                                           cmLocalGenerator::UNCHANGED));
     }
-  if(!cleanImportName.empty())
+  if(!targetNameImport.empty())
     {
-    exeCleanFiles.push_back(this->Convert(cleanFullImportName.c_str(),
+    exeCleanFiles.push_back(this->Convert(targetFullPathImport.c_str(),
                                           cmLocalGenerator::START_OUTPUT,
                                           cmLocalGenerator::UNCHANGED));
     }
@@ -293,10 +280,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   // cleaned.  We do not want to delete the .pdb file just before
   // linking the target.
   this->CleanFiles.push_back
-    (this->Convert(cleanFullPDBName.c_str(),
+    (this->Convert(targetFullPathPDB.c_str(),
                    cmLocalGenerator::START_OUTPUT,
                    cmLocalGenerator::UNCHANGED));
-  }
 
   // Add the pre-build and pre-link rules building but not when relinking.
   if(!relink)

+ 0 - 12
Source/cmTarget.cxx

@@ -2835,18 +2835,6 @@ void cmTarget::GetExecutableNames(std::string& name,
                                    this->GetType(), config);
 }
 
-//----------------------------------------------------------------------------
-void cmTarget::GetExecutableCleanNames(std::string& name,
-                                       std::string& realName,
-                                       std::string& impName,
-                                       std::string& pdbName,
-                                       const char* config)
-{
-  // Get the name and versioned name of this executable.
-  this->GetExecutableNamesInternal(name, realName, impName, pdbName,
-                                   cmTarget::EXECUTABLE, config);
-}
-
 //----------------------------------------------------------------------------
 void cmTarget::GetExecutableNamesInternal(std::string& name,
                                           std::string& realName,

+ 0 - 8
Source/cmTarget.h

@@ -333,14 +333,6 @@ public:
                           std::string& impName,
                           std::string& pdbName, const char* config);
 
-  /** Get the names of the executable used to remove existing copies
-      of the executable from the build tree either before linking or
-      during a clean step.  This should be called only on an
-      executable target.  */
-  void GetExecutableCleanNames(std::string& name, std::string& realName,
-                               std::string& impName,
-                               std::string& pdbName, const char* config);
-
   /** Add the target output files to the global generator manifest.  */
   void GenerateTargetManifest(const char* config);