diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index a3e24bb..1703fe7 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -145,3 +145,20 @@ IF(NOT "${Special_VERSION_MINOR}" STREQUAL "2") MESSAGE(SEND_ERROR "Package Special is minor version [${Special_VERSION_MINOR}], not [2]") ENDIF(NOT "${Special_VERSION_MINOR}" STREQUAL "2") + +# Test version number comparison. +IF(NOT "1.2.3.4" VERSION_LESS "1.2.3.5") + MESSAGE(SEND_ERROR "1.2.3.4 VERSION_LESS 1.2.3.5 is not true!") +ENDIF() +IF(NOT "1.2" VERSION_LESS "1.10") + MESSAGE(SEND_ERROR "1.2 VERSION_LESS 1.10 is not true!") +ENDIF() +IF(NOT "1.02" VERSION_GREATER "1.1") + MESSAGE(SEND_ERROR "1.02 VERSION_GREATER 1.1 is not true!") +ENDIF() +IF("1.2.3" VERSION_GREATER "1.2.3.4") + MESSAGE(SEND_ERROR "1.2.3 VERSION_GREATER 1.2.3.4 is not false!") +ENDIF() +IF(NOT "1.2" VERSION_EQUAL "1.2.0.0") + MESSAGE(SEND_ERROR "1.2 VERSION_EQUAL 1.2.0.0 is not true!") +ENDIF() |