diff options
author | Ken Martin <ken.martin@kitware.com> | 2008-06-26 17:01:35 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2008-06-26 17:01:35 (GMT) |
commit | 19e891532a915d1fa4fcf4cdba6254d28c2adc6c (patch) | |
tree | 8f128805f9f8e6bcef1bee2a10acf9e4b6e4bc83 /Source/cmListFileCache.cxx | |
parent | d8e05b43a1fc0370aa3ac84f4209b1b942809b89 (diff) | |
download | CMake-19e891532a915d1fa4fcf4cdba6254d28c2adc6c.zip CMake-19e891532a915d1fa4fcf4cdba6254d28c2adc6c.tar.gz CMake-19e891532a915d1fa4fcf4cdba6254d28c2adc6c.tar.bz2 |
ENH: support parenthesis as arguments and in conditionals feature request #6191
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index a11ab98..93d3290 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -242,11 +242,26 @@ bool cmListFileCacheParseFunction(cmListFileLexer* lexer, // Arguments. unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer); + unsigned long parenDepth = 0; while((token = cmListFileLexer_Scan(lexer))) { - if(token->type == cmListFileLexer_Token_ParenRight) + if(token->type == cmListFileLexer_Token_ParenLeft) { - return true; + parenDepth++; + cmListFileArgument a("(", + false, filename, token->line); + function.Arguments.push_back(a); + } + else if(token->type == cmListFileLexer_Token_ParenRight) + { + if (parenDepth == 0) + { + return true; + } + parenDepth--; + cmListFileArgument a(")", + false, filename, token->line); + function.Arguments.push_back(a); } else if(token->type == cmListFileLexer_Token_Identifier || token->type == cmListFileLexer_Token_ArgumentUnquoted) |