Commit 254be613 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmMakefile: Move resource management into the IncludeScope.

parent 826b6e68
...@@ -486,6 +486,7 @@ cmMakefile::IncludeScope::~IncludeScope() ...@@ -486,6 +486,7 @@ cmMakefile::IncludeScope::~IncludeScope()
this->EnforceCMP0011(); this->EnforceCMP0011();
} }
} }
this->Makefile->ListFileStack.pop_back();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -544,16 +545,12 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) ...@@ -544,16 +545,12 @@ 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"));
bool result = false;
{
IncludeScope incScope(this, noPolicyScope); IncludeScope incScope(this, noPolicyScope);
result = this->ReadListFile(listfile, false); bool result = this->ReadListFile(listfile, false);
if(cmSystemTools::GetFatalErrorOccured()) if(cmSystemTools::GetFatalErrorOccured())
{ {
incScope.Quiet(); incScope.Quiet();
} }
}
this->ListFileStack.pop_back();
return result; return result;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment