On 8 November 2012 21:49, Even Rouault <[email protected]> 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
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to