فهرست منبع

cmMakefile: Remove fullPath parameter from ReadListFile.

There is no reason for this to be a responsibility of
ReadListFile.  Additionally, the only user of it already computes
it itself.
Stephen Kelly 10 سال پیش
والد
کامیت
5bb4248a80
4فایلهای تغییر یافته به همراه3 افزوده شده و 15 حذف شده
  1. 1 1
      Source/cmFindPackageCommand.cxx
  2. 2 4
      Source/cmIncludeCommand.cxx
  3. 0 9
      Source/cmMakefile.cxx
  4. 0 1
      Source/cmMakefile.h

+ 1 - 1
Source/cmFindPackageCommand.cxx

@@ -999,7 +999,7 @@ bool cmFindPackageCommand::FindAppBundleConfig()
 //----------------------------------------------------------------------------
 bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr)
 {
-  if(this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(), f, 0,
+  if(this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(), f,
                                   !this->PolicyScope || psr == NoPolicyScope))
     {
     return true;

+ 2 - 4
Source/cmIncludeCommand.cxx

@@ -130,17 +130,15 @@ bool cmIncludeCommand
     gg->GenerateImportFile(fname_abs);
     }
 
-  std::string fullFilePath;
   bool readit =
     this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(),
-                                  fname.c_str(), &fullFilePath,
-                                  noPolicyScope);
+                                  fname.c_str(), noPolicyScope);
 
   // add the location of the included file if a result variable was given
   if (!resultVarName.empty())
     {
       this->Makefile->AddDefinition(resultVarName,
-                                    readit?fullFilePath.c_str():"NOTFOUND");
+                                    readit?fname_abs.c_str():"NOTFOUND");
     }
 
   if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured())

+ 0 - 9
Source/cmMakefile.cxx

@@ -527,7 +527,6 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
 //
 bool cmMakefile::ReadListFile(const char* filename_in,
                               const char *external_in,
-                              std::string* fullPath,
                               bool noPolicyScope)
 {
   std::string currentParentFile
@@ -598,19 +597,11 @@ bool cmMakefile::ReadListFile(const char* filename_in,
 
   // push the listfile onto the stack
   this->ListFileStack.push_back(filenametoread);
-  if(fullPath!=0)
-    {
-    *fullPath=filenametoread;
-    }
   cmListFile cacheFile;
   if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
     {
     // pop the listfile off the stack
     this->ListFileStack.pop_back();
-    if(fullPath!=0)
-      {
-      *fullPath = "";
-      }
     this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
     this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
     this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());

+ 0 - 1
Source/cmMakefile.h

@@ -87,7 +87,6 @@ public:
    */
   bool ReadListFile(const char* listfile,
                     const char* external= 0,
-                    std::string* fullPath= 0,
                     bool noPolicyScope = true);
 
   /**