summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-06-26 17:01:35 (GMT)
committerKen Martin <ken.martin@kitware.com>2008-06-26 17:01:35 (GMT)
commit19e891532a915d1fa4fcf4cdba6254d28c2adc6c (patch)
tree8f128805f9f8e6bcef1bee2a10acf9e4b6e4bc83 /Source/cmListFileCache.cxx
parentd8e05b43a1fc0370aa3ac84f4209b1b942809b89 (diff)
downloadCMake-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.cxx19
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)