diff options
author | Brad King <brad.king@kitware.com> | 2008-09-10 14:11:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-09-10 14:11:48 (GMT) |
commit | 994262e5cc05abfb96da9af38f8d84988405ea5b (patch) | |
tree | 3fe840a4aadc7988608eb9e7491e6908f76b3649 /Tests/FindPackageTest/FindVersionTestB.cmake | |
parent | 4eaac32db62f96796fc6bfe09d5cc83ff1b15fe6 (diff) | |
download | CMake-994262e5cc05abfb96da9af38f8d84988405ea5b.zip CMake-994262e5cc05abfb96da9af38f8d84988405ea5b.tar.gz CMake-994262e5cc05abfb96da9af38f8d84988405ea5b.tar.bz2 |
ENH: Improve find_package version numbering
Make the number of version components specified explicitly available.
Set variables for unspecified version components to "0" instead of
leaving them unset. This simplifies version number handling for find-
and config-modules. Also support a fourth "tweak" version component
since some packages use them.
Diffstat (limited to 'Tests/FindPackageTest/FindVersionTestB.cmake')
-rw-r--r-- | Tests/FindPackageTest/FindVersionTestB.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Tests/FindPackageTest/FindVersionTestB.cmake b/Tests/FindPackageTest/FindVersionTestB.cmake index 787d200..03173c6 100644 --- a/Tests/FindPackageTest/FindVersionTestB.cmake +++ b/Tests/FindPackageTest/FindVersionTestB.cmake @@ -7,6 +7,12 @@ ENDIF(NOT "${VersionTestB_FIND_VERSION_MAJOR}" STREQUAL "1") IF(NOT "${VersionTestB_FIND_VERSION_MINOR}" STREQUAL "2") MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_MINOR=${VersionTestB_FIND_VERSION_MINOR} is not 2") ENDIF(NOT "${VersionTestB_FIND_VERSION_MINOR}" STREQUAL "2") -IF(DEFINED VersionTestB_FIND_VERSION_PATCH) - MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_PATCH should not be defined") -ENDIF(DEFINED VersionTestB_FIND_VERSION_PATCH) +IF(NOT "${VersionTestB_FIND_VERSION_PATCH}" STREQUAL "0") + MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_PATCH=${VersionTestB_FIND_VERSION_PATCH} is not 0") +ENDIF(NOT "${VersionTestB_FIND_VERSION_PATCH}" STREQUAL "0") +IF(NOT "${VersionTestB_FIND_VERSION_TWEAK}" STREQUAL "0") + MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_TWEAK=${VersionTestB_FIND_VERSION_TWEAK} is not 0") +ENDIF(NOT "${VersionTestB_FIND_VERSION_TWEAK}" STREQUAL "0") +IF(NOT "${VersionTestB_FIND_VERSION_COUNT}" STREQUAL "2") + MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_COUNT=${VersionTestB_FIND_VERSION_COUNT} is not 2") +ENDIF(NOT "${VersionTestB_FIND_VERSION_COUNT}" STREQUAL "2") |