summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-21 20:53:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-30 21:14:18 (GMT)
commit0818737c851dce18a6da442ee73029b0de22ad56 (patch)
tree93f56b87f219e2e43eb5bfb81abdfb6739433287 /Source/cmMakefile.cxx
parentdd7e42758d4874c087bbbc6ae062f36455f6d49c (diff)
downloadCMake-0818737c851dce18a6da442ee73029b0de22ad56.zip
CMake-0818737c851dce18a6da442ee73029b0de22ad56.tar.gz
CMake-0818737c851dce18a6da442ee73029b0de22ad56.tar.bz2
cmMakefile: Make listfile scopes responsible for logical checks.
Remove the LexicalPushPop.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9948ac8..d6cf104 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -412,10 +412,12 @@ public:
: Makefile(mf), ReportError(true)
{
this->Makefile->PushPolicyBarrier();
+ this->Makefile->PushFunctionBlockerBarrier();
}
~BuildsystemFileScope()
{
+ this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
this->Makefile->PopPolicyBarrier(this->ReportError);
}
@@ -502,11 +504,13 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf,
// The included file cannot pop our policy scope.
this->Makefile->PushPolicyBarrier();
this->Makefile->ListFileStack.push_back(filenametoread);
+ this->Makefile->PushFunctionBlockerBarrier();
}
//----------------------------------------------------------------------------
cmMakefile::IncludeScope::~IncludeScope()
{
+ this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
// Enforce matching policy scopes inside the included file.
this->Makefile->PopPolicyBarrier(this->ReportError);
@@ -605,10 +609,12 @@ public:
: Makefile(mf), ReportError(true)
{
this->Makefile->PushPolicyBarrier();
+ this->Makefile->PushFunctionBlockerBarrier();
}
~ListFileScope()
{
+ this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
this->Makefile->PopPolicyBarrier(this->ReportError);
this->Makefile->ListFileStack.pop_back();
}
@@ -645,8 +651,6 @@ bool cmMakefile::ReadListFile(const char* filename)
void cmMakefile::ReadListFile(cmListFile const& listFile,
std::string const& filenametoread)
{
- LexicalPushPop lexScope(this);
-
// add this list file to the list of dependencies
this->ListFiles.push_back(filenametoread);
@@ -671,8 +675,6 @@ void cmMakefile::ReadListFile(cmListFile const& listFile,
this->ExecuteCommand(listFile.Functions[i],status);
if(cmSystemTools::GetFatalErrorOccured())
{
- // Exit early due to error.
- lexScope.Quiet();
break;
}
if(status.GetReturnInvoked())
@@ -3521,19 +3523,6 @@ cmMakefile::RemoveFunctionBlocker(cmFunctionBlocker* fb,
return cmsys::auto_ptr<cmFunctionBlocker>();
}
-//----------------------------------------------------------------------------
-cmMakefile::LexicalPushPop::LexicalPushPop(cmMakefile* mf):
- Makefile(mf), ReportError(true)
-{
- this->Makefile->PushFunctionBlockerBarrier();
-}
-
-//----------------------------------------------------------------------------
-cmMakefile::LexicalPushPop::~LexicalPushPop()
-{
- this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
-}
-
const char* cmMakefile::GetHomeDirectory() const
{
return this->GetCMakeInstance()->GetHomeDirectory();