[cmake-developers] Config files and version components
Alexander Neundorf
neundorf at kde.org
Mon Jan 21 11:15:54 EST 2013
On Monday 21 January 2013, Stephen Kelly wrote:
> 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?
Not sure I remember correctly.
I think initially somewhere not all component-wise version variables had been
set. I think after some discussion we concluded that it makes sense to set
unset version components to 0.
I.e. 4.0 means IMO implicitely 4.0.0.0.
Where do you see a problem with this ?
Alex
More information about the cmake-developers
mailing list