Merge topic 'generator-expression-bug-fixes'
4bacff7
GenEx: Test early determination of AND and OR
This commit is contained in:
commit
b3927bce78
|
@ -14,6 +14,9 @@ add_custom_target(check ALL
|
||||||
-Dtest_and_1=$<AND:1>
|
-Dtest_and_1=$<AND:1>
|
||||||
-Dtest_and_1_0=$<AND:1,0>
|
-Dtest_and_1_0=$<AND:1,0>
|
||||||
-Dtest_and_1_1=$<AND:1,1>
|
-Dtest_and_1_1=$<AND:1,1>
|
||||||
|
# Ordinarily, the 'invalidcontent' would cause an error, but
|
||||||
|
# the '0' makes the AND abort early.
|
||||||
|
-Dtest_and_0_invalidcontent=$<AND:0,invalidcontent>
|
||||||
-Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
|
-Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
|
||||||
-Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
|
-Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
|
||||||
-Dtest_not_0=$<NOT:0>
|
-Dtest_not_0=$<NOT:0>
|
||||||
|
@ -24,6 +27,7 @@ add_custom_target(check ALL
|
||||||
-Dtest_or_1=$<OR:1>
|
-Dtest_or_1=$<OR:1>
|
||||||
-Dtest_or_1_0=$<OR:1,0>
|
-Dtest_or_1_0=$<OR:1,0>
|
||||||
-Dtest_or_1_1=$<OR:1,1>
|
-Dtest_or_1_1=$<OR:1,1>
|
||||||
|
-Dtest_or_1_invalidcontent=$<OR:1,invalidcontent>
|
||||||
-Dtest_bool_notfound=$<BOOL:NOTFOUND>
|
-Dtest_bool_notfound=$<BOOL:NOTFOUND>
|
||||||
-Dtest_bool_foo_notfound=$<BOOL:Foo-NOTFOUND>
|
-Dtest_bool_foo_notfound=$<BOOL:Foo-NOTFOUND>
|
||||||
-Dtest_bool_true=$<BOOL:True>
|
-Dtest_bool_true=$<BOOL:True>
|
||||||
|
|
|
@ -15,6 +15,7 @@ check(test_and_0_1 "0")
|
||||||
check(test_and_1 "1")
|
check(test_and_1 "1")
|
||||||
check(test_and_1_0 "0")
|
check(test_and_1_0 "0")
|
||||||
check(test_and_1_1 "1")
|
check(test_and_1_1 "1")
|
||||||
|
check(test_and_0_invalidcontent "0")
|
||||||
check(test_config_0 "0")
|
check(test_config_0 "0")
|
||||||
check(test_config_1 "1")
|
check(test_config_1 "1")
|
||||||
check(test_not_0 "1")
|
check(test_not_0 "1")
|
||||||
|
@ -25,6 +26,7 @@ check(test_or_0_1 "1")
|
||||||
check(test_or_1 "1")
|
check(test_or_1 "1")
|
||||||
check(test_or_1_0 "1")
|
check(test_or_1_0 "1")
|
||||||
check(test_or_1_1 "1")
|
check(test_or_1_1 "1")
|
||||||
|
check(test_or_1_invalidcontent "1")
|
||||||
check(test_bool_notfound "0")
|
check(test_bool_notfound "0")
|
||||||
check(test_bool_foo_notfound "0")
|
check(test_bool_foo_notfound "0")
|
||||||
check(test_bool_true "1")
|
check(test_bool_true "1")
|
||||||
|
|
|
@ -39,6 +39,15 @@ CMake Error at BadAND.cmake:1 \(add_custom_target\):
|
||||||
|
|
||||||
\$<AND:nothing>
|
\$<AND:nothing>
|
||||||
|
|
||||||
|
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:1,nothing>
|
||||||
|
|
||||||
Parameters to \$<AND> must resolve to either '0' or '1'.
|
Parameters to \$<AND> must resolve to either '0' or '1'.
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
CMakeLists.txt:3 \(include\)$
|
CMakeLists.txt:3 \(include\)$
|
||||||
|
|
|
@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
|
||||||
$<AND:,>
|
$<AND:,>
|
||||||
$<AND:01>
|
$<AND:01>
|
||||||
$<AND:nothing>
|
$<AND:nothing>
|
||||||
|
$<AND:1,nothing>
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
|
@ -39,6 +39,15 @@ CMake Error at BadOR.cmake:1 \(add_custom_target\):
|
||||||
|
|
||||||
\$<OR:nothing>
|
\$<OR:nothing>
|
||||||
|
|
||||||
|
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:0,nothing>
|
||||||
|
|
||||||
Parameters to \$<OR> must resolve to either '0' or '1'.
|
Parameters to \$<OR> must resolve to either '0' or '1'.
|
||||||
Call Stack \(most recent call first\):
|
Call Stack \(most recent call first\):
|
||||||
CMakeLists.txt:3 \(include\)$
|
CMakeLists.txt:3 \(include\)$
|
||||||
|
|
|
@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
|
||||||
$<OR:,>
|
$<OR:,>
|
||||||
$<OR:01>
|
$<OR:01>
|
||||||
$<OR:nothing>
|
$<OR:nothing>
|
||||||
|
$<OR:0,nothing>
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
Loading…
Reference in New Issue