[Insight-developers] ITK version numbers (was: Bump CMakeLists.txt version to 4.1.0)

Brad King brad.king at kitware.com
Mon Dec 19 13:27:31 EST 2011


On 12/19/2011 1:13 PM, Bill Lorensen wrote at http://review.source.kitware.com/3545:
> VTK has a nice feature for versioning. If the minor version is odd,
> the patch version is the kwsys generated date stamp.

ITK and VTK both have something along those lines:

   http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/include/itkVersion.h;hb=v4.0.0#l40
   http://vtk.org/gitweb?p=VTK.git;a=blob;f=Common/vtkVersion.h;hb=v5.8.0#l31

I don't remember actually using a date as the patch level in either project.

CMake used to use the date as the patch level in development versions.
However it now uses the date as the fourth component so we don't actually
need an odd/even distinction.  The CMake version number is of the form:

  major.minor.patch.<date|tweak>

If the fourth component is less than 20000000 then it is a release and
otherwise it is a development version as of the given date (CCYYMMDD).
This has the advantage that if a feature is introduced on a given date
then someone that needs it can depend on the development version as of
that date as the minimum required version.  The next release will have
a version number larger than that because the major.minor.patch part
will be bigger.

-Brad


More information about the Insight-developers mailing list