diff options
Diffstat (limited to 'Tests/CMakeTests/VersionTest.cmake.in')
-rw-r--r-- | Tests/CMakeTests/VersionTest.cmake.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CMakeTests/VersionTest.cmake.in b/Tests/CMakeTests/VersionTest.cmake.in index 4e946ab..f045605 100644 --- a/Tests/CMakeTests/VersionTest.cmake.in +++ b/Tests/CMakeTests/VersionTest.cmake.in @@ -83,10 +83,24 @@ foreach(v IN LISTS LESSV) message(FATAL_ERROR "${CMAKE_MATCH_2} is less than ${CMAKE_MATCH_1}?") endif() + # check greater or equal (same as less negative) + if(CMAKE_MATCH_2 VERSION_GREATER_EQUAL CMAKE_MATCH_1) + message(STATUS "${CMAKE_MATCH_2} is not less than ${CMAKE_MATCH_1}") + else() + message(FATAL_ERROR "${CMAKE_MATCH_2} is less than ${CMAKE_MATCH_1}?") + endif() + # check greater negative case if(NOT CMAKE_MATCH_1 VERSION_GREATER CMAKE_MATCH_2) message(STATUS "${CMAKE_MATCH_1} is not greater than ${CMAKE_MATCH_2}") else() message(FATAL_ERROR "${CMAKE_MATCH_1} is greater than ${CMAKE_MATCH_2}?") endif() + + # check less or equal (same as greater negative) case + if(CMAKE_MATCH_1 VERSION_LESS_EQUAL CMAKE_MATCH_2) + message(STATUS "${CMAKE_MATCH_1} is not greater than ${CMAKE_MATCH_2}") + else() + message(FATAL_ERROR "${CMAKE_MATCH_1} is greater than ${CMAKE_MATCH_2}?") + endif() endforeach() |