ENH: Better error message for unclosed blocks

This centralizes construction of the error message for an unclosed
logical block (if, foreach, etc.).  We record the line at which each
block is opened so it can be reported in the error message.
This commit is contained in:
Brad King
2009-01-21 09:48:20 -05:00
parent b8f5a934ec
commit bca1026250
13 changed files with 30 additions and 73 deletions
-9
View File
@@ -107,15 +107,6 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf)
return false;
}
void cmForEachFunctionBlocker::
ScopeEnded(cmMakefile &mf)
{
cmSystemTools::Error("The end of a CMakeLists file was reached with a "
"FOREACH statement that was not closed properly. "
"Within the directory: ",
mf.GetCurrentDirectory());
}
bool cmForEachCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{