diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-18 12:50:31 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-18 13:29:17 (GMT) |
commit | 5bb4248a807029053156dbf4a3cdba4427766306 (patch) | |
tree | 90439f898a63d61351f1fb5b72346382f272ce82 /Source | |
parent | fc7ab8874b0e5c2c010fb73718ae8702b8853ca0 (diff) | |
download | CMake-5bb4248a807029053156dbf4a3cdba4427766306.zip CMake-5bb4248a807029053156dbf4a3cdba4427766306.tar.gz CMake-5bb4248a807029053156dbf4a3cdba4427766306.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmIncludeCommand.cxx | 6 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 9 | ||||
-rw-r--r-- | Source/cmMakefile.h | 1 |
4 files changed, 3 insertions, 15 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index e1074b0..af99b1c 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/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; diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index c15d46e..0c2e73a 100644 --- a/Source/cmIncludeCommand.cxx +++ b/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()) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 205508b..8bc4ac8 100644 --- a/Source/cmMakefile.cxx +++ b/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()); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 299d550..ce21c60 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -87,7 +87,6 @@ public: */ bool ReadListFile(const char* listfile, const char* external= 0, - std::string* fullPath= 0, bool noPolicyScope = true); /** |