Alexander Neundorf wrote:

> 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 ?

Only that I think it's odd.

The Foo package name is 4.3.2, but if you check all the components, it looks 
like 4.3.2.0, which is not 'true'.

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to