summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-11 07:53:10 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-06-12 12:09:36 (GMT)
commite6055284b347775ae1396725704778af0bfb56c7 (patch)
treea35bffc4faadf289d7239796edbc2104f74e8f2d /Tests
parent48bb48e114b7141b63e9c905f0258531c6b78cb1 (diff)
downloadCMake-e6055284b347775ae1396725704778af0bfb56c7.zip
CMake-e6055284b347775ae1396725704778af0bfb56c7.tar.gz
CMake-e6055284b347775ae1396725704778af0bfb56c7.tar.bz2
Add generator expressions for version comparision.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt6
-rw-r--r--Tests/GeneratorExpression/check-part2.cmake6
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 9cd8a7f..e2fc353 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -130,6 +130,12 @@ add_custom_target(check-part2 ALL
-Dtest_arbitrary_content_comma_8=$<1:a,,b>
-Dtest_arbitrary_content_comma_9=$<1:a,,b,,>
-Dtest_arbitrary_content_comma_10=$<1:,,a,,b,,>
+ -Dtest_version_greater_1=$<VERSION_GREATER:1.0,1.1.1>
+ -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_2=$<VERSION_LESS: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>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 2)"
VERBATIM
diff --git a/Tests/GeneratorExpression/check-part2.cmake b/Tests/GeneratorExpression/check-part2.cmake
index a1db5f6..f9b33b3 100644
--- a/Tests/GeneratorExpression/check-part2.cmake
+++ b/Tests/GeneratorExpression/check-part2.cmake
@@ -44,3 +44,9 @@ check(test_arbitrary_content_comma_7 ",,a")
check(test_arbitrary_content_comma_8 "a,,b")
check(test_arbitrary_content_comma_9 "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")