From dd7e42758d4874c087bbbc6ae062f36455f6d49c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 21 Jun 2015 22:50:52 +0200 Subject: [PATCH] cmMakefile: Move the lexical scope. --- Source/cmMakefile.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a10f99cd2..9948ac889 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -645,6 +645,8 @@ 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); @@ -661,9 +663,6 @@ void cmMakefile::ReadListFile(cmListFile const& listFile, this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE"); this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR"); - // Enforce balanced blocks (if/endif, function/endfunction, etc.). - LexicalPushPop lexScope(this); - // Run the parsed commands. const size_t numberFunctions = listFile.Functions.size(); for(size_t i =0; i < numberFunctions; ++i)