mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
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.
This commit is contained in:
@@ -10,3 +10,9 @@ ENDIF(NOT "${VersionTestC_FIND_VERSION_MINOR}" STREQUAL "2")
|
||||
IF(NOT "${VersionTestC_FIND_VERSION_PATCH}" STREQUAL "3")
|
||||
MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_PATCH=${VersionTestC_FIND_VERSION_PATCH} is not 3")
|
||||
ENDIF(NOT "${VersionTestC_FIND_VERSION_PATCH}" STREQUAL "3")
|
||||
IF(NOT "${VersionTestC_FIND_VERSION_TWEAK}" STREQUAL "0")
|
||||
MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_TWEAK=${VersionTestC_FIND_VERSION_TWEAK} is not 0")
|
||||
ENDIF(NOT "${VersionTestC_FIND_VERSION_TWEAK}" STREQUAL "0")
|
||||
IF(NOT "${VersionTestC_FIND_VERSION_COUNT}" STREQUAL "3")
|
||||
MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_COUNT=${VersionTestC_FIND_VERSION_COUNT} is not 3")
|
||||
ENDIF(NOT "${VersionTestC_FIND_VERSION_COUNT}" STREQUAL "3")
|
||||
|
||||
Reference in New Issue
Block a user