[cmake-developers] Config files and version components
Stephen Kelly
steveire at gmail.com
Mon Jan 21 08:04:24 EST 2013
Hi,
Currently it is common to set somepackage_VERSION_{MAJOR,MINOR,PATCH} in a
Config.cmake file.
The somepackage_VERSION_{MAJOR,MINOR,PATCH,TWEAK} variables are already set
if parsable from the PACKAGE_VERSION if set. This is the case if using
WRITE_BASIC_PACKAGE_VERSION_FILE().
The problem I see is that those variables are set to "0" if the version
component is not set. This appears to be a side-effect of the way they are
stored in the cmFindPackageCommand (eg, unsigned int VersionMinor). There is
also the somepackage_VERSION_COUNT to say how many components are valid.
I consider it a bug that the variables are set to "0" if the version
component is not set. Can we change that?
Thanks,
Steve.
More information about the cmake-developers
mailing list