2012-09-23 11:16:44 +00:00
|
|
|
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
|
2012-08-13 13:49:53 +00:00
|
|
|
|
|
|
|
message(STATUS "config=[${config}]")
|
2013-12-31 14:57:25 +00:00
|
|
|
check(config "${short_config}")
|
2012-08-13 13:49:53 +00:00
|
|
|
check(test_0 "")
|
2012-10-04 08:27:34 +00:00
|
|
|
check(test_0_with_comma "")
|
2012-08-13 13:49:53 +00:00
|
|
|
check(test_1 "content")
|
2012-10-04 08:27:34 +00:00
|
|
|
check(test_1_with_comma "-Wl,--no-undefined")
|
2012-08-13 13:49:53 +00:00
|
|
|
check(test_and_0 "0")
|
|
|
|
check(test_and_0_0 "0")
|
|
|
|
check(test_and_0_1 "0")
|
|
|
|
check(test_and_1 "1")
|
|
|
|
check(test_and_1_0 "0")
|
|
|
|
check(test_and_1_1 "1")
|
2012-10-20 12:14:20 +00:00
|
|
|
check(test_and_0_invalidcontent "0")
|
2012-08-13 14:00:32 +00:00
|
|
|
check(test_config_0 "0")
|
|
|
|
check(test_config_1 "1")
|
2012-11-01 13:21:25 +00:00
|
|
|
foreach(c debug release relwithdebinfo minsizerel)
|
|
|
|
if(NOT "${test_config_${c}}" MATCHES "^(0+|1+)$")
|
|
|
|
message(SEND_ERROR "test_config_${c} is \"${test_config_${c}}\", not all 0 or all 1")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
2012-08-13 13:49:53 +00:00
|
|
|
check(test_not_0 "1")
|
|
|
|
check(test_not_1 "0")
|
|
|
|
check(test_or_0 "0")
|
|
|
|
check(test_or_0_0 "0")
|
|
|
|
check(test_or_0_1 "1")
|
|
|
|
check(test_or_1 "1")
|
|
|
|
check(test_or_1_0 "1")
|
|
|
|
check(test_or_1_1 "1")
|
2012-10-20 12:14:20 +00:00
|
|
|
check(test_or_1_invalidcontent "1")
|
2012-09-12 02:20:42 +00:00
|
|
|
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")
|
2012-10-04 08:24:32 +00:00
|
|
|
check(test_bool_empty "0")
|
2012-09-12 02:20:42 +00:00
|
|
|
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")
|
2013-03-12 06:52:01 +00:00
|
|
|
check(test_strequal_semicolon "1")
|
2012-09-12 02:20:42 +00:00
|
|
|
check(test_strequal_angle_r_comma "0")
|
2012-10-03 22:34:03 +00:00
|
|
|
check(test_strequal_both_empty "1")
|
|
|
|
check(test_strequal_one_empty "0")
|
2012-09-12 02:20:42 +00:00
|
|
|
check(test_angle_r ">")
|
|
|
|
check(test_comma ",")
|
2013-03-12 06:52:01 +00:00
|
|
|
check(test_semicolon ";")
|
2012-10-12 14:51:16 +00:00
|
|
|
check(test_colons_1 ":")
|
|
|
|
check(test_colons_2 "::")
|
|
|
|
check(test_colons_3 "Qt5::Core")
|
|
|
|
check(test_colons_4 "C:\\\\CMake")
|
|
|
|
check(test_colons_5 "C:/CMake")
|