BUG: Fixed line number of end of file error message.
This commit is contained in:
parent
486a26d3db
commit
c5756a41d3
|
@ -237,6 +237,7 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arguments.
|
// Arguments.
|
||||||
|
unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer);
|
||||||
while((token = cmListFileLexer_Scan(lexer)))
|
while((token = cmListFileLexer_Scan(lexer)))
|
||||||
{
|
{
|
||||||
if(token->type == cmListFileLexer_Token_ParenRight)
|
if(token->type == cmListFileLexer_Token_ParenRight)
|
||||||
|
@ -269,11 +270,12 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer,
|
||||||
cmSystemTools::Error(error.str().c_str());
|
cmSystemTools::Error(error.str().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
lastLine = cmListFileLexer_GetCurrentLine(lexer);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmOStringStream error;
|
cmOStringStream error;
|
||||||
error << "Error in cmake code at\n"
|
error << "Error in cmake code at\n"
|
||||||
<< filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n"
|
<< filename << ":" << lastLine << ":\n"
|
||||||
<< "Parse error. Function missing ending \")\". "
|
<< "Parse error. Function missing ending \")\". "
|
||||||
<< "End of file reached.";
|
<< "End of file reached.";
|
||||||
cmSystemTools::Error(error.str().c_str());
|
cmSystemTools::Error(error.str().c_str());
|
||||||
|
|
Loading…
Reference in New Issue