Imported Upstream version 2.8.11.2
[platform/upstream/cmake.git] / Tests / GeneratorExpression / check-part1.cmake
1
2 include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
3
4 message(STATUS "config=[${config}]")
5 check(test_0 "")
6 check(test_0_with_comma "")
7 check(test_1 "content")
8 check(test_1_with_comma "-Wl,--no-undefined")
9 check(test_and_0 "0")
10 check(test_and_0_0 "0")
11 check(test_and_0_1 "0")
12 check(test_and_1 "1")
13 check(test_and_1_0 "0")
14 check(test_and_1_1 "1")
15 check(test_and_0_invalidcontent "0")
16 check(test_config_0 "0")
17 check(test_config_1 "1")
18 foreach(c debug release relwithdebinfo minsizerel)
19   if(NOT "${test_config_${c}}" MATCHES "^(0+|1+)$")
20     message(SEND_ERROR "test_config_${c} is \"${test_config_${c}}\", not all 0 or all 1")
21   endif()
22 endforeach()
23 check(test_not_0 "1")
24 check(test_not_1 "0")
25 check(test_or_0 "0")
26 check(test_or_0_0 "0")
27 check(test_or_0_1 "1")
28 check(test_or_1 "1")
29 check(test_or_1_0 "1")
30 check(test_or_1_1 "1")
31 check(test_or_1_invalidcontent "1")
32 check(test_bool_notfound "0")
33 check(test_bool_foo_notfound "0")
34 check(test_bool_true "1")
35 check(test_bool_false "0")
36 check(test_bool_on "1")
37 check(test_bool_off "0")
38 check(test_bool_no "0")
39 check(test_bool_n "0")
40 check(test_bool_empty "0")
41 check(test_strequal_yes_yes "1")
42 check(test_strequal_yes_yes_cs "0")
43 check(test_strequal_yes_no "0")
44 check(test_strequal_no_yes "0")
45 check(test_strequal_angle_r "1")
46 check(test_strequal_comma "1")
47 check(test_strequal_semicolon "1")
48 check(test_strequal_angle_r_comma "0")
49 check(test_strequal_both_empty "1")
50 check(test_strequal_one_empty "0")
51 check(test_angle_r ">")
52 check(test_comma ",")
53 check(test_semicolon ";")
54 check(test_colons_1 ":")
55 check(test_colons_2 "::")
56 check(test_colons_3 "Qt5::Core")
57 check(test_colons_4 "C:\\\\CMake")
58 check(test_colons_5 "C:/CMake")