cmMakefile: Remove CurrentListFile member.

It is never read externally.  The CollapseFullPath removed in this commit
is a repeat of a similar call inside ReadListFile.
This commit is contained in:
Stephen Kelly 2015-05-14 23:49:10 +02:00
parent 6b9e647239
commit f3e6a336f2
2 changed files with 1 additions and 16 deletions

View File

@ -601,7 +601,6 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
bool cmMakefile::ProcessBuildsystemFile(const char* listfile) bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
{ {
this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile); this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
this->cmCurrentListFile = listfile;
std::string curSrc = this->GetCurrentSourceDirectory(); std::string curSrc = this->GetCurrentSourceDirectory();
return this->ReadListFile(listfile, true, return this->ReadListFile(listfile, true,
curSrc == this->GetHomeDirectory()); curSrc == this->GetHomeDirectory());
@ -611,11 +610,7 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
{ {
this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->AddDefinition("CMAKE_PARENT_LIST_FILE",
this->GetDefinition("CMAKE_CURRENT_LIST_FILE")); this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
this->cmCurrentListFile = return this->ReadListFile(listfile, noPolicyScope);
cmSystemTools::CollapseFullPath(listfile,
this->GetCurrentSourceDirectory());
return this->ReadListFile(this->cmCurrentListFile.c_str(),
noPolicyScope);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -418,14 +418,6 @@ public:
void SetCurrentBinaryDirectory(const std::string& dir); void SetCurrentBinaryDirectory(const std::string& dir);
const char* GetCurrentBinaryDirectory() const; const char* GetCurrentBinaryDirectory() const;
/* Get the current CMakeLists.txt file that is being processed. This
* is just used in order to be able to 'branch' from one file to a second
* transparently */
const char* GetCurrentListFile() const
{
return this->cmCurrentListFile.c_str();
}
//@} //@}
/** /**
@ -845,8 +837,6 @@ protected:
// Check for a an unused variable // Check for a an unused variable
void CheckForUnused(const char* reason, const std::string& name) const; void CheckForUnused(const char* reason, const std::string& name) const;
std::string cmCurrentListFile;
std::string ProjectName; // project name std::string ProjectName; // project name
// libraries, classes, and executables // libraries, classes, and executables