Merge topic 'split-GeneratorExpression-test'

cacb938 Split the GeneratorExpression test into a third part.
This commit is contained in:
Brad King 2013-07-01 09:16:09 -04:00 committed by CMake Topic Stage
commit c46142bcae
3 changed files with 22 additions and 9 deletions

View File

@ -1,6 +1,9 @@
cmake_minimum_required (VERSION 2.8.8) cmake_minimum_required (VERSION 2.8.8)
project(GeneratorExpression CXX) project(GeneratorExpression CXX)
# This test is split into multiple parts as needed to avoid NMake command
# length limits.
add_custom_target(check-part1 ALL add_custom_target(check-part1 ALL
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-Dtest_0=$<0:nothing> -Dtest_0=$<0:nothing>
@ -60,7 +63,7 @@ add_custom_target(check-part1 ALL
-Dtest_colons_4=$<1:C:\\CMake> -Dtest_colons_4=$<1:C:\\CMake>
-Dtest_colons_5=$<1:C:/CMake> -Dtest_colons_5=$<1:C:/CMake>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part1.cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part1.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 1 of 2)" COMMAND ${CMAKE_COMMAND} -E echo "check done (part 1 of 3)"
VERBATIM VERBATIM
) )
@ -130,13 +133,20 @@ add_custom_target(check-part2 ALL
-Dtest_arbitrary_content_comma_8=$<1:a,,b> -Dtest_arbitrary_content_comma_8=$<1:a,,b>
-Dtest_arbitrary_content_comma_9=$<1:a,,b,,> -Dtest_arbitrary_content_comma_9=$<1:a,,b,,>
-Dtest_arbitrary_content_comma_10=$<1:,,a,,b,,> -Dtest_arbitrary_content_comma_10=$<1:,,a,,b,,>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 3)"
VERBATIM
)
add_custom_target(check-part3 ALL
COMMAND ${CMAKE_COMMAND}
-Dtest_version_greater_1=$<VERSION_GREATER:1.0,1.1.1> -Dtest_version_greater_1=$<VERSION_GREATER:1.0,1.1.1>
-Dtest_version_greater_2=$<VERSION_GREATER:1.1.1,1.0> -Dtest_version_greater_2=$<VERSION_GREATER:1.1.1,1.0>
-Dtest_version_less_1=$<VERSION_LESS:1.1.1,1.0> -Dtest_version_less_1=$<VERSION_LESS:1.1.1,1.0>
-Dtest_version_less_2=$<VERSION_LESS:1.0,1.1.1> -Dtest_version_less_2=$<VERSION_LESS:1.0,1.1.1>
-Dtest_version_equal_1=$<VERSION_EQUAL:1.0.1,1.1> -Dtest_version_equal_1=$<VERSION_EQUAL:1.0.1,1.1>
-Dtest_version_equal_2=$<VERSION_EQUAL:1.1,1.1> -Dtest_version_equal_2=$<VERSION_EQUAL:1.1,1.1>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 2)" COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)"
VERBATIM VERBATIM
) )

View File

@ -44,9 +44,3 @@ check(test_arbitrary_content_comma_7 ",,a")
check(test_arbitrary_content_comma_8 "a,,b") check(test_arbitrary_content_comma_8 "a,,b")
check(test_arbitrary_content_comma_9 "a,,b,,") check(test_arbitrary_content_comma_9 "a,,b,,")
check(test_arbitrary_content_comma_10 ",,a,,b,,") check(test_arbitrary_content_comma_10 ",,a,,b,,")
check(test_version_greater_1 "0")
check(test_version_greater_2 "1")
check(test_version_less_1 "0")
check(test_version_less_2 "1")
check(test_version_equal_1 "0")
check(test_version_equal_2 "1")

View File

@ -0,0 +1,9 @@
include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
check(test_version_greater_1 "0")
check(test_version_greater_2 "1")
check(test_version_less_1 "0")
check(test_version_less_2 "1")
check(test_version_equal_1 "0")
check(test_version_equal_2 "1")