mirror of
https://github.com/reactos/CMake.git
synced 2025-01-19 01:42:18 +00:00
ENH: Added support for comments inside function calls and indented comments.
This commit is contained in:
parent
007f5ccd5f
commit
08ff3427a8
@ -209,7 +209,7 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
|
||||
if(fin.getline(inbuffer, BUFFER_SIZE ) )
|
||||
{
|
||||
cmRegularExpression blankLine("^$");
|
||||
cmRegularExpression comment("^#.*$");
|
||||
cmRegularExpression comment("^[ \t]*#.*$");
|
||||
cmRegularExpression oneLiner("^[ \t]*([A-Za-z_0-9]*)[ \t]*\\((.*)\\)[ \t]*$");
|
||||
cmRegularExpression multiLine("^[ \t]*([A-Za-z_0-9]*)[ \t]*\\((.*)$");
|
||||
cmRegularExpression lastLine("^(.*)\\)[ \t]*$");
|
||||
@ -271,6 +271,10 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
|
||||
// read lines until the end paren is found
|
||||
if(fin.getline(inbuffer, BUFFER_SIZE ) )
|
||||
{
|
||||
// Check for comment lines and ignore them.
|
||||
if(blankLine.find(inbuffer) || comment.find(inbuffer))
|
||||
{ continue; }
|
||||
// Is this the last line?
|
||||
if(lastLine.find(inbuffer))
|
||||
{
|
||||
done = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user