summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-03-14 21:34:24 (GMT)
committerBrad King <brad.king@kitware.com>2001-03-14 21:34:24 (GMT)
commit08ff3427a806064369057fe997f77d75f82a6806 (patch)
treec0ed4b4f6771ea1d74ae4e00776486985d85258f /Source/cmSystemTools.cxx
parent007f5ccd5fb5f4a751b6e5fceb87f862bf4fb1c8 (diff)
downloadCMake-08ff3427a806064369057fe997f77d75f82a6806.zip
CMake-08ff3427a806064369057fe997f77d75f82a6806.tar.gz
CMake-08ff3427a806064369057fe997f77d75f82a6806.tar.bz2
ENH: Added support for comments inside function calls and indented comments.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f6fff77..ca1cc5d 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -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;