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/FindVersionTestA.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/FindVersionTestA.cmake')
-rw-r--r-- | Tests/FindPackageTest/FindVersionTestA.cmake | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Tests/FindPackageTest/FindVersionTestA.cmake b/Tests/FindPackageTest/FindVersionTestA.cmake index eedf371..55c67e2 100644 --- a/Tests/FindPackageTest/FindVersionTestA.cmake +++ b/Tests/FindPackageTest/FindVersionTestA.cmake @@ -4,9 +4,15 @@ ENDIF(NOT "${VersionTestA_FIND_VERSION}" STREQUAL "1") IF(NOT "${VersionTestA_FIND_VERSION_MAJOR}" STREQUAL "1") MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MAJOR=${VersionTestA_FIND_VERSION_MAJOR} is not 1") ENDIF(NOT "${VersionTestA_FIND_VERSION_MAJOR}" STREQUAL "1") -IF(DEFINED VersionTestA_FIND_VERSION_MINOR) - MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MINOR should not be defined") -ENDIF(DEFINED VersionTestA_FIND_VERSION_MINOR) -IF(DEFINED VersionTestA_FIND_VERSION_PATCH) - MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_PATCH should not be defined") -ENDIF(DEFINED VersionTestA_FIND_VERSION_PATCH) +IF(NOT "${VersionTestA_FIND_VERSION_MINOR}" STREQUAL "0") + MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MINOR=${VersionTestA_FIND_VERSION_MINOR} is not 0") +ENDIF(NOT "${VersionTestA_FIND_VERSION_MINOR}" STREQUAL "0") +IF(NOT "${VersionTestA_FIND_VERSION_PATCH}" STREQUAL "0") + MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_PATCH=${VersionTestA_FIND_VERSION_PATCH} is not 0") +ENDIF(NOT "${VersionTestA_FIND_VERSION_PATCH}" STREQUAL "0") +IF(NOT "${VersionTestA_FIND_VERSION_TWEAK}" STREQUAL "0") + MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_TWEAK=${VersionTestA_FIND_VERSION_TWEAK} is not 0") +ENDIF(NOT "${VersionTestA_FIND_VERSION_TWEAK}" STREQUAL "0") +IF(NOT "${VersionTestA_FIND_VERSION_COUNT}" STREQUAL "1") + MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_COUNT=${VersionTestA_FIND_VERSION_COUNT} is not 1") +ENDIF(NOT "${VersionTestA_FIND_VERSION_COUNT}" STREQUAL "1") |