summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Syntax
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-17 01:41:47 (GMT)
committerBrad King <brad.king@kitware.com>2013-08-08 17:26:27 (GMT)
commit58e524165d44e672e391cca261d9f7dd723d2c70 (patch)
treec1d02fa92e6437232a97e487afc4b04d361f162e /Tests/RunCMake/Syntax
parente75b69f55bcdc6ee524dfd0cab568644379fbacb (diff)
downloadCMake-58e524165d44e672e391cca261d9f7dd723d2c70.zip
CMake-58e524165d44e672e391cca261d9f7dd723d2c70.tar.gz
CMake-58e524165d44e672e391cca261d9f7dd723d2c70.tar.bz2
Warn about arguments not separated by whitespace
Teach the lexer to return tokens for whitespace. Teach the parser to tolerate the space tokens where whitespace is allowed. Also teach the parser to diagnose and warn about cases of quoted arguments followed immediately by another argument. This was accidentally allowed previously, so we only warn. Update the RunCMake.Syntax test case StringNoSpace expected stderr to include the warnings.
Diffstat (limited to 'Tests/RunCMake/Syntax')
-rw-r--r--Tests/RunCMake/Syntax/StringNoSpace-stderr.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
index 2d111aa..89c2d2a 100644
--- a/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
+++ b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
@@ -1,3 +1,19 @@
-^\[1 \${var} \\n 4\]
+CMake Warning \(dev\) at CMakeLists.txt:3 \(include\):
+ Syntax Warning in cmake code at
+
+ .*/Tests/RunCMake/Syntax/StringNoSpace.cmake:2:28
+
+ Argument not separated from preceding token by whitespace.
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at CMakeLists.txt:3 \(include\):
+ Syntax Warning in cmake code at
+
+ .*/Tests/RunCMake/Syntax/StringNoSpace.cmake:2:31
+
+ Argument not separated from preceding token by whitespace.
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+\[1 \${var} \\n 4\]
\[x\]
\[y\]$