diff options
author | Brad King <brad.king@kitware.com> | 2004-08-31 22:51:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-08-31 22:51:35 (GMT) |
commit | c5756a41d34c12b6ed8128697eb47e941278f6c2 (patch) | |
tree | 34f6f698e14f74c94802d44ba9f0f6580cb5a3c8 /Source/cmListFileCache.cxx | |
parent | 486a26d3db24cf2569310b4b2dad32667cbbcaa1 (diff) | |
download | CMake-c5756a41d34c12b6ed8128697eb47e941278f6c2.zip CMake-c5756a41d34c12b6ed8128697eb47e941278f6c2.tar.gz CMake-c5756a41d34c12b6ed8128697eb47e941278f6c2.tar.bz2 |
BUG: Fixed line number of end of file error message.
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 442cd6d..203696b 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -237,6 +237,7 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, } // Arguments. + unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer); while((token = cmListFileLexer_Scan(lexer))) { if(token->type == cmListFileLexer_Token_ParenRight) @@ -269,11 +270,12 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, cmSystemTools::Error(error.str().c_str()); return false; } + lastLine = cmListFileLexer_GetCurrentLine(lexer); } cmOStringStream error; error << "Error in cmake code at\n" - << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n" + << filename << ":" << lastLine << ":\n" << "Parse error. Function missing ending \")\". " << "End of file reached."; cmSystemTools::Error(error.str().c_str()); |