diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-12 02:20:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-28 12:49:21 (GMT) |
commit | e028381bf1c5d1fdf464ed835a549be4a0569adb (patch) | |
tree | 4ef5222eba72b5eb1be25b392a3725271bb78644 /Tests/GeneratorExpression | |
parent | b8e61d687abfacf1d5ed3b10cfe20315a344620c (diff) | |
download | CMake-e028381bf1c5d1fdf464ed835a549be4a0569adb.zip CMake-e028381bf1c5d1fdf464ed835a549be4a0569adb.tar.gz CMake-e028381bf1c5d1fdf464ed835a549be4a0569adb.tar.bz2 |
Extend the generator expression language with more logic.
Generator expressions for comparing strings, evaluating
strings as booleans, and for creating literal right-angle-brackets
and commas are added. Those may be needed in some cases
where they appear in literals.
Diffstat (limited to 'Tests/GeneratorExpression')
-rw-r--r-- | Tests/GeneratorExpression/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Tests/GeneratorExpression/check.cmake | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 2b135dc..79a8abb 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -22,6 +22,23 @@ add_custom_target(check ALL -Dtest_or_1=$<OR:1> -Dtest_or_1_0=$<OR:1,0> -Dtest_or_1_1=$<OR:1,1> + -Dtest_bool_notfound=$<BOOL:NOTFOUND> + -Dtest_bool_foo_notfound=$<BOOL:Foo-NOTFOUND> + -Dtest_bool_true=$<BOOL:True> + -Dtest_bool_false=$<BOOL:False> + -Dtest_bool_on=$<BOOL:On> + -Dtest_bool_off=$<BOOL:Off> + -Dtest_bool_no=$<BOOL:No> + -Dtest_bool_n=$<BOOL:N> + -Dtest_strequal_yes_yes=$<STREQUAL:Yes,Yes> + -Dtest_strequal_yes_yes_cs=$<STREQUAL:Yes,yes> + -Dtest_strequal_yes_no=$<STREQUAL:Yes,No> + -Dtest_strequal_no_yes=$<STREQUAL:No,Yes> + -Dtest_strequal_angle_r=$<STREQUAL:$<ANGLE-R>,$<ANGLE-R>> + -Dtest_strequal_comma=$<STREQUAL:$<COMMA>,$<COMMA>> + -Dtest_strequal_angle_r_comma=$<STREQUAL:$<ANGLE-R>,$<COMMA>> + -Dtest_angle_r=$<ANGLE-R> + -Dtest_comma=$<COMMA> -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake COMMAND ${CMAKE_COMMAND} -E echo "check done" VERBATIM diff --git a/Tests/GeneratorExpression/check.cmake b/Tests/GeneratorExpression/check.cmake index e243d85..6fb87a2 100644 --- a/Tests/GeneratorExpression/check.cmake +++ b/Tests/GeneratorExpression/check.cmake @@ -23,3 +23,20 @@ check(test_or_0_1 "1") check(test_or_1 "1") check(test_or_1_0 "1") check(test_or_1_1 "1") +check(test_bool_notfound "0") +check(test_bool_foo_notfound "0") +check(test_bool_true "1") +check(test_bool_false "0") +check(test_bool_on "1") +check(test_bool_off "0") +check(test_bool_no "0") +check(test_bool_n "0") +check(test_strequal_yes_yes "1") +check(test_strequal_yes_yes_cs "0") +check(test_strequal_yes_no "0") +check(test_strequal_no_yes "0") +check(test_strequal_angle_r "1") +check(test_strequal_comma "1") +check(test_strequal_angle_r_comma "0") +check(test_angle_r ">") +check(test_comma ",") |