summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-11 17:53:38 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-18 21:02:23 (GMT)
commitf1eacf0e07759b57d100dbf5d83c70e4028bcb54 (patch)
tree8ccbb516aa96dd286e81f690845b7ddf72741f35 /Tests/RunCMake
parent1d3db6b34df827566ffe5615d568de0ef64d3e61 (diff)
downloadCMake-f1eacf0e07759b57d100dbf5d83c70e4028bcb54.zip
CMake-f1eacf0e07759b57d100dbf5d83c70e4028bcb54.tar.gz
CMake-f1eacf0e07759b57d100dbf5d83c70e4028bcb54.tar.bz2
cmGeneratorExpression: Re-write for multi-stage evaluation
The expressions may be parsed and then cached and evaluated multiple times. They are evaluated lazily so that literals such as ',' can be treated as universal parameter separators, and can be processed from results without appearing literally, and without interfering with the parsing/evaluation of the entire expression.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt31
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadAND.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt36
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadNOT-stderr.txt32
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadNOT.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt31
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadOR.cmake3
8 files changed, 136 insertions, 7 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
index ced21d8..36302db 100644
--- a/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
@@ -1,9 +1,18 @@
CMake Error at BadAND.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
+ \$<AND>
+
+ \$<AND> expression requires at least one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadAND.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
\$<AND:>
- AND requires one or more comma-separated '0' or '1' values.
+ Parameters to \$<AND> must resolve to either '0' or '1'.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -12,6 +21,24 @@ CMake Error at BadAND.cmake:1 \(add_custom_target\):
\$<AND:,>
- AND requires one or more comma-separated '0' or '1' values.
+ Parameters to \$<AND> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadAND.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<AND:01>
+
+ Parameters to \$<AND> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadAND.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<AND:nothing>
+
+ Parameters to \$<AND> must resolve to either '0' or '1'.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadAND.cmake b/Tests/RunCMake/GeneratorExpression/BadAND.cmake
index 7926540..265e414 100644
--- a/Tests/RunCMake/GeneratorExpression/BadAND.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadAND.cmake
@@ -1,4 +1,7 @@
add_custom_target(check ALL COMMAND check
+ $<AND>
$<AND:>
$<AND:,>
+ $<AND:01>
+ $<AND:nothing>
VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
index 7c86b25..1cfbf40 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
@@ -1,8 +1,44 @@
CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
+ \$<CONFIG>
+
+ \$<CONFIG> expression requires exactly one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
\$<CONFIG:.>
Expression syntax not recognized.
Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<CONFIG:Foo,Bar>
+
+ \$<CONFIG> expression requires exactly one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<CONFIG:Foo-Bar>
+
+ Expression syntax not recognized.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<CONFIG:Foo-Nested>
+
+ Expression syntax not recognized.
+Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
index 0c13f89..c27ea5f 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
@@ -1,3 +1,7 @@
add_custom_target(check ALL COMMAND check
+ $<CONFIG>
$<CONFIG:.>
+ $<CONFIG:Foo,Bar>
+ $<CONFIG:Foo-Bar>
+ $<$<CONFIG:Foo-Nested>:foo>
VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/BadNOT-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadNOT-stderr.txt
index 5721f5f..32169c5 100644
--- a/Tests/RunCMake/GeneratorExpression/BadNOT-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadNOT-stderr.txt
@@ -1,9 +1,17 @@
CMake Error at BadNOT.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
+ \$<NOT>
+
+ \$<NOT> expression requires exactly one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++CMake Error at BadNOT.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
\$<NOT:>
- NOT requires exactly one '0' or '1' value.
+ \$<NOT> parameter must resolve to exactly one '0' or '1' value.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -12,7 +20,7 @@ CMake Error at BadNOT.cmake:1 \(add_custom_target\):
\$<NOT:,>
- NOT requires exactly one '0' or '1' value.
+ \$<NOT> parameter must resolve to exactly one '0' or '1' value.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -21,6 +29,24 @@ CMake Error at BadNOT.cmake:1 \(add_custom_target\):
\$<NOT:0,1>
- NOT requires exactly one '0' or '1' value.
+ \$<NOT> expression requires exactly one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadNOT.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<NOT:01>
+
+ \$<NOT> parameter must resolve to exactly one '0' or '1' value.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadNOT.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<NOT:nothing>
+
+ \$<NOT> parameter must resolve to exactly one '0' or '1' value.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadNOT.cmake b/Tests/RunCMake/GeneratorExpression/BadNOT.cmake
index 452293b..c2dada3 100644
--- a/Tests/RunCMake/GeneratorExpression/BadNOT.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadNOT.cmake
@@ -1,5 +1,8 @@
add_custom_target(check ALL COMMAND check
+ $<NOT>
$<NOT:>
$<NOT:,>
$<NOT:0,1>
+ $<NOT:01>
+ $<NOT:nothing>
VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
index 72ef2dd..d4ccab7 100644
--- a/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
@@ -1,9 +1,18 @@
CMake Error at BadOR.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
+ \$<OR>
+
+ \$<OR> expression requires at least one parameter.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadOR.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
\$<OR:>
- OR requires one or more comma-separated '0' or '1' values.
+ Parameters to \$<OR> must resolve to either '0' or '1'.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
@@ -12,6 +21,24 @@ CMake Error at BadOR.cmake:1 \(add_custom_target\):
\$<OR:,>
- OR requires one or more comma-separated '0' or '1' values.
+ Parameters to \$<OR> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadOR.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<OR:01>
+
+ Parameters to \$<OR> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadOR.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<OR:nothing>
+
+ Parameters to \$<OR> must resolve to either '0' or '1'.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadOR.cmake b/Tests/RunCMake/GeneratorExpression/BadOR.cmake
index f16f56a..0813400 100644
--- a/Tests/RunCMake/GeneratorExpression/BadOR.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadOR.cmake
@@ -1,4 +1,7 @@
add_custom_target(check ALL COMMAND check
+ $<OR>
$<OR:>
$<OR:,>
+ $<OR:01>
+ $<OR:nothing>
VERBATIM)