diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:09:13 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:10:52 (GMT) |
commit | 5c837686287eb22e73af76d2ab7f32d5bf8cb9ec (patch) | |
tree | b264362b2044d813d1b2aec1cad02dc2504a00ac /Source | |
parent | c10ab014344e693a65d7cfbfb9b4e0f8a8b155f9 (diff) | |
download | CMake-5c837686287eb22e73af76d2ab7f32d5bf8cb9ec.zip CMake-5c837686287eb22e73af76d2ab7f32d5bf8cb9ec.tar.gz CMake-5c837686287eb22e73af76d2ab7f32d5bf8cb9ec.tar.bz2 |
cmMakefile: Make the IncludeScope more responsible.
It is now responsible for all resource management when
including a file.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 744e848..dee290c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -409,7 +409,8 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, class cmMakefile::IncludeScope { public: - IncludeScope(cmMakefile* mf, bool noPolicyScope); + IncludeScope(cmMakefile* mf, std::string const& filenametoread, + bool noPolicyScope); ~IncludeScope(); void Quiet() { this->ReportError = false; } private: @@ -422,6 +423,7 @@ private: //---------------------------------------------------------------------------- cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, + std::string const& filenametoread, bool noPolicyScope): Makefile(mf), NoPolicyScope(noPolicyScope), CheckCMP0011(false), ReportError(true) @@ -457,6 +459,7 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, // The included file cannot pop our policy scope. this->Makefile->PushPolicyBarrier(); + this->Makefile->ListFileStack.push_back(filenametoread); } //---------------------------------------------------------------------------- @@ -561,8 +564,7 @@ bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope) cmSystemTools::CollapseFullPath(filename, this->GetCurrentSourceDirectory()); - IncludeScope incScope(this, noPolicyScope); - this->ListFileStack.push_back(filenametoread); + IncludeScope incScope(this, filenametoread, noPolicyScope); cmListFile listFile; if (!listFile.ParseFile(filenametoread.c_str(), false, this)) |