mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
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:
@@ -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 &)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user