[gdal-dev] Which version number for the next GDAL release : 1.10 or 2.0 ?

Mateusz Loskot mateusz at loskot.net
Thu Nov 8 14:42:27 PST 2012


On 8 November 2012 21:49, Even Rouault <even.rouault at mines-paris.org> wrote:
>
> I'm also wondering if we shouldn't introduce a macro to compute the version
> number, like
> #define GDAL_COMPUTE_VERSION(maj,min,rev, build)
> (maj*1000000+min*10000+rev*100+build)
>
> so that tests can be written more naturally (the new version number would have
> too many zeros, that I bet most people would likely go wrong) :
>
> #if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(1,10,0,0)
> // foo
> #endif

Yes, please!

Not sure what you mean as the build number,
but here is how Boost computes version numbers:

// BOOST_VERSION % 100 is the patch level
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 105200

It makes a bit shorter number.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list