On Monday 21 January 2013, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> >> > 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'.
> >
> > Is VERSION_COUNT then actually set to 3 or 4 ?
>
> It is set correctly to 3, but still, it's something else to check. You
> can't just check the MINOR or PATCH version. You have to also check the
> COUNT.
>
> This isn't something I'll fight against. Just something I noticed that I
> considered odd and not ideal for using.
I actually think it makes using it easier.
If you check VERSION_COUNT, then you know exactly what components you have to
take care of.
If you don't, you can simply concatenate the components and always get a valid
version number:
"${MAJOR}.${MINOR}.${PATCH}.${TWEAK}"
without a lot of if()'s.
Alex
--
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