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 /Modules/readme.txt | |
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 'Modules/readme.txt')
-rw-r--r-- | Modules/readme.txt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Modules/readme.txt b/Modules/readme.txt index 8d4615a..8e4474e 100644 --- a/Modules/readme.txt +++ b/Modules/readme.txt @@ -67,20 +67,25 @@ line. A FindXXX.cmake module will typically be loaded by the command - FIND_PACKAGE(XXX [major[.minor[.patch]]] [EXACT] + FIND_PACKAGE(XXX [major[.minor[.patch[.tweak]]]] [EXACT] [QUIET] [REQUIRED [components...]]) If any version numbers are given to the command it will set the -variable XXX_FIND_VERSION to contain the whole version. The variables -XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and -XXX_FIND_VERSION_PATCH will be set to contain the corresponding -portions of the version number. The variable XXX_FIND_VERSION_EXACT -will indicate whether an exact version is requested. +following variables before loading the module: + + XXX_FIND_VERSION = full requested version string + XXX_FIND_VERSION_MAJOR = major version if requested, else 0 + XXX_FIND_VERSION_MINOR = minor version if requested, else 0 + XXX_FIND_VERSION_PATCH = patch version if requested, else 0 + XXX_FIND_VERSION_TWEAK = tweak version if requested, else 0 + XXX_FIND_VERSION_COUNT = number of version components, 0 to 4 + XXX_FIND_VERSION_EXACT = true if EXACT option was given + If the find module supports versioning it should locate a version of the package that is compatible with the version requested. If a compatible version of the package cannot be found the module should not report success. The version of the package found should be stored -in the version variables named above. +in "XXX_VERSION..." version variables docmented by the module. If the QUIET option is given to the command it will set the variable XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module. If |