2012-08-13 17:49:53 +04:00
|
|
|
cmake_minimum_required (VERSION 2.8.8)
|
|
|
|
project(GeneratorExpression NONE)
|
|
|
|
|
2012-09-23 15:16:44 +04:00
|
|
|
add_custom_target(check-part1 ALL
|
2012-08-13 17:49:53 +04:00
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-Dtest_0=$<0:nothing>
|
2012-10-04 12:27:34 +04:00
|
|
|
-Dtest_0_with_comma=$<0:-Wl,--no-undefined>
|
2012-08-13 17:49:53 +04:00
|
|
|
-Dtest_1=$<1:content>
|
2012-10-04 12:27:34 +04:00
|
|
|
-Dtest_1_with_comma=$<1:-Wl,--no-undefined>
|
2012-08-13 17:49:53 +04:00
|
|
|
-Dconfig=$<CONFIGURATION>
|
|
|
|
-Dtest_and_0=$<AND:0>
|
|
|
|
-Dtest_and_0_0=$<AND:0,0>
|
|
|
|
-Dtest_and_0_1=$<AND:0,1>
|
|
|
|
-Dtest_and_1=$<AND:1>
|
|
|
|
-Dtest_and_1_0=$<AND:1,0>
|
|
|
|
-Dtest_and_1_1=$<AND:1,1>
|
2012-10-20 16:14:20 +04:00
|
|
|
# Ordinarily, the 'invalidcontent' would cause an error, but
|
|
|
|
# the '0' makes the AND abort early.
|
|
|
|
-Dtest_and_0_invalidcontent=$<AND:0,invalidcontent>
|
2012-08-13 18:00:32 +04:00
|
|
|
-Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
|
|
|
|
-Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
|
2012-11-01 17:21:25 +04:00
|
|
|
-Dtest_config_debug=$<CONFIG:Debug>$<CONFIG:DEBUG>$<CONFIG:DeBuG>
|
|
|
|
-Dtest_config_release=$<CONFIG:Release>$<CONFIG:RELEASE>$<CONFIG:ReLeAsE>
|
|
|
|
-Dtest_config_relwithdebinfo=$<CONFIG:RelWithDebInfo>$<CONFIG:RELWITHDEBINFO>$<CONFIG:relwithdebinfo>
|
|
|
|
-Dtest_config_minsizerel=$<CONFIG:MinSizeRel>$<CONFIG:MINSIZEREL>$<CONFIG:minsizerel>
|
2012-08-13 17:49:53 +04:00
|
|
|
-Dtest_not_0=$<NOT:0>
|
|
|
|
-Dtest_not_1=$<NOT:1>
|
|
|
|
-Dtest_or_0=$<OR:0>
|
|
|
|
-Dtest_or_0_0=$<OR:0,0>
|
|
|
|
-Dtest_or_0_1=$<OR:0,1>
|
|
|
|
-Dtest_or_1=$<OR:1>
|
|
|
|
-Dtest_or_1_0=$<OR:1,0>
|
|
|
|
-Dtest_or_1_1=$<OR:1,1>
|
2012-10-20 16:14:20 +04:00
|
|
|
-Dtest_or_1_invalidcontent=$<OR:1,invalidcontent>
|
2012-09-12 06:20:42 +04:00
|
|
|
-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>
|
2012-10-04 12:24:32 +04:00
|
|
|
-Dtest_bool_empty=$<BOOL:>
|
2012-09-12 06:20:42 +04:00
|
|
|
-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>>
|
2012-10-04 02:34:03 +04:00
|
|
|
-Dtest_strequal_both_empty=$<STREQUAL:,>
|
|
|
|
-Dtest_strequal_one_empty=$<STREQUAL:something,>
|
2012-09-12 06:20:42 +04:00
|
|
|
-Dtest_angle_r=$<ANGLE-R>
|
|
|
|
-Dtest_comma=$<COMMA>
|
2012-10-12 18:51:16 +04:00
|
|
|
-Dtest_colons_1=$<1::>
|
|
|
|
-Dtest_colons_2=$<1:::>
|
|
|
|
-Dtest_colons_3=$<1:Qt5::Core>
|
|
|
|
-Dtest_colons_4=$<1:C:\\CMake>
|
|
|
|
-Dtest_colons_5=$<1:C:/CMake>
|
2012-09-23 15:16:44 +04:00
|
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part1.cmake
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 1 of 2)"
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(check-part2 ALL
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
2012-10-12 19:34:16 +04:00
|
|
|
-Dtest_incomplete_1=$<
|
|
|
|
-Dtest_incomplete_2=$<something
|
|
|
|
-Dtest_incomplete_3=$<something:
|
|
|
|
-Dtest_incomplete_4=$<something:,
|
|
|
|
-Dtest_incomplete_5=$something:,>
|
|
|
|
-Dtest_incomplete_6=<something:,>
|
|
|
|
-Dtest_incomplete_7=$<something::
|
|
|
|
-Dtest_incomplete_8=$<something:,
|
|
|
|
-Dtest_incomplete_9=$<something:,,
|
|
|
|
-Dtest_incomplete_10=$<something:,:
|
|
|
|
-Dtest_incomplete_11=$<something,,
|
|
|
|
-Dtest_incomplete_12=$<,,
|
|
|
|
-Dtest_incomplete_13=$<some$<1:special>thing
|
2012-10-16 02:22:18 +04:00
|
|
|
-Dtest_incomplete_14=$<$<ANGLE-R>
|
2012-10-12 19:34:16 +04:00
|
|
|
-Dtest_incomplete_15=$<some$<thing
|
2012-10-16 02:22:18 +04:00
|
|
|
-Dtest_incomplete_16=$<BOOL:something
|
2012-10-12 19:34:16 +04:00
|
|
|
-Dtest_incomplete_17=$<1:some$thing>
|
|
|
|
-Dtest_incomplete_18=$<1:some,thing
|
|
|
|
-Dtest_incomplete_19=$<1:some,thing$<ANGLE-R>
|
|
|
|
-Dtest_incomplete_20=$<CONFIGURATION$<ANGLE-R>
|
|
|
|
-Dtest_incomplete_21=$<BOOL:something$<ANGLE-R>
|
2012-09-23 15:16:44 +04:00
|
|
|
-Dtest_build_interface=$<BUILD_INTERFACE:build>
|
|
|
|
-Dtest_install_interface=$<INSTALL_INTERFACE:install>
|
2012-12-10 14:33:23 +04:00
|
|
|
-Dtest_target_name_1=$<TARGET_NAME:tgt,ok>
|
|
|
|
-Dtest_target_name_2=$<TARGET_NAME:tgt:ok>
|
2013-01-27 12:43:44 +04:00
|
|
|
-Dtest_install_prefix=$<INSTALL_PREFIX>
|
2012-09-23 15:16:44 +04:00
|
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 2)"
|
2012-08-13 17:49:53 +04:00
|
|
|
VERBATIM
|
|
|
|
)
|