From d0d3c6c212bf42b40dc84a1c5b8eda0793526a51 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Sat, 31 May 2008 08:15:00 -0400 Subject: [PATCH] ENH: make end of file checking for close if, foreach, macro, functions etc enabled. Not sure why it was disabled to start with, but I suspect I will find out. In reponse to Bill email about a ctest -S script with a function that waqs not closed. Closure was only checked for regular listfiles not other files. --- Source/cmMakefile.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4c871efc4..bdf3e6479 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -487,13 +487,14 @@ bool cmMakefile::ReadListFile(const char* filename_in, { this->cmCurrentListFile = filename; } - // loop over current function blockers and record them - std::list::iterator pos; - for (pos = this->FunctionBlockers.begin(); - pos != this->FunctionBlockers.end(); ++pos) - { - originalBlockers.insert(*pos); - } + } + + // loop over current function blockers and record them + std::list::iterator pos; + for (pos = this->FunctionBlockers.begin(); + pos != this->FunctionBlockers.end(); ++pos) + { + originalBlockers.insert(*pos); } // Now read the input file @@ -542,7 +543,7 @@ bool cmMakefile::ReadListFile(const char* filename_in, } // add this list file to the list of dependencies this->ListFiles.push_back( filenametoread); - bool endScopeNicely = filename? true: false; + bool endScopeNicely = true; const size_t numberFunctions = cacheFile.Functions.size(); for(size_t i =0; i < numberFunctions; ++i) {