summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-21 20:56:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-30 21:14:19 (GMT)
commitb661403177edb1d22b89cc4a0ea69a8f93ad2ad2 (patch)
treeda19cbe9000e8b7a35adea29558e569160eb7934
parent6708d21664baf3bab6f8af143c373de7af84bffc (diff)
downloadCMake-b661403177edb1d22b89cc4a0ea69a8f93ad2ad2.zip
CMake-b661403177edb1d22b89cc4a0ea69a8f93ad2ad2.tar.gz
CMake-b661403177edb1d22b89cc4a0ea69a8f93ad2ad2.tar.bz2
cmMakefile: Add filename to ReadListFile auto scopes.
-rw-r--r--Source/cmMakefile.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b21e441..b9a66d3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -408,9 +408,10 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
class cmMakefile::BuildsystemFileScope
{
public:
- BuildsystemFileScope(cmMakefile* mf)
+ BuildsystemFileScope(cmMakefile* mf, std::string const& filename)
: Makefile(mf), ReportError(true)
{
+ this->Makefile->ListFileStack.push_back(filename);
this->Makefile->PushPolicyBarrier();
this->Makefile->PushFunctionBlockerBarrier();
}
@@ -432,14 +433,13 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename)
this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
std::string curSrc = this->GetCurrentSourceDirectory();
- this->ListFileStack.push_back(filename);
+ BuildsystemFileScope scope(this, filename);
cmListFile listFile;
if (!listFile.ParseFile(filename, curSrc == this->GetHomeDirectory(), this))
{
return false;
}
- BuildsystemFileScope scope(this);
this->ReadListFile(listFile, filename);
if(cmSystemTools::GetFatalErrorOccured())
{
@@ -604,9 +604,10 @@ bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
class cmMakefile::ListFileScope
{
public:
- ListFileScope(cmMakefile* mf)
+ ListFileScope(cmMakefile* mf, std::string const& filenametoread)
: Makefile(mf), ReportError(true)
{
+ this->Makefile->ListFileStack.push_back(filenametoread);
this->Makefile->PushPolicyBarrier();
this->Makefile->PushFunctionBlockerBarrier();
}
@@ -630,7 +631,7 @@ bool cmMakefile::ReadListFile(const char* filename)
cmSystemTools::CollapseFullPath(filename,
this->GetCurrentSourceDirectory());
- this->ListFileStack.push_back(filenametoread);
+ ListFileScope scope(this, filenametoread);
cmListFile listFile;
if (!listFile.ParseFile(filenametoread.c_str(), false, this))
@@ -638,7 +639,6 @@ bool cmMakefile::ReadListFile(const char* filename)
return false;
}
- ListFileScope scope(this);
this->ReadListFile(listFile, filenametoread);
if(cmSystemTools::GetFatalErrorOccured())
{