summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-21 17:56:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-21 18:10:50 (GMT)
commit254be613b803816a918c12d7d7eca40a7c9f7c09 (patch)
tree7b16507c9c9aadb19f8315a8f12d2f528f2a5633
parent826b6e68184759cda496f0073a8f59b2155cfdaf (diff)
downloadCMake-254be613b803816a918c12d7d7eca40a7c9f7c09.zip
CMake-254be613b803816a918c12d7d7eca40a7c9f7c09.tar.gz
CMake-254be613b803816a918c12d7d7eca40a7c9f7c09.tar.bz2
cmMakefile: Move resource management into the IncludeScope.
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 87d6e3c..b02cfc8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -486,6 +486,7 @@ cmMakefile::IncludeScope::~IncludeScope()
this->EnforceCMP0011();
}
}
+ this->Makefile->ListFileStack.pop_back();
}
//----------------------------------------------------------------------------
@@ -544,16 +545,12 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE",
this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
- bool result = false;
- {
IncludeScope incScope(this, noPolicyScope);
- result = this->ReadListFile(listfile, false);
+ bool result = this->ReadListFile(listfile, false);
if(cmSystemTools::GetFatalErrorOccured())
{
incScope.Quiet();
}
- }
- this->ListFileStack.pop_back();
return result;
}