CMAKE_VERSION.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. CMAKE_VERSION
  2. -------------
  3. The CMake version string as up to four non-negative integer components
  4. separated by ``.`` and possibly followed by ``-`` and other information.
  5. The first three components represent the feature level and the fourth
  6. component represents either a bug-fix level or development date.
  7. Release versions and release candidate versions of CMake use the format::
  8. <major>.<minor>.<patch>[.<tweak>][-rc<n>]
  9. where the ``<tweak>`` component is less than ``20000000``. Development
  10. versions of CMake use the format::
  11. <major>.<minor>.<patch>.<date>[-<id>]
  12. where the ``<date>`` component is of format ``CCYYMMDD`` and ``<id>``
  13. may contain arbitrary text. This represents development as of a
  14. particular date following the ``<major>.<minor>.<patch>`` feature
  15. release.
  16. Individual component values are also available in variables:
  17. * :variable:`CMAKE_MAJOR_VERSION`
  18. * :variable:`CMAKE_MINOR_VERSION`
  19. * :variable:`CMAKE_PATCH_VERSION`
  20. * :variable:`CMAKE_TWEAK_VERSION`
  21. Use the :command:`if` command ``VERSION_LESS``, ``VERSION_EQUAL``, or
  22. ``VERSION_GREATER`` operators to compare version string values against
  23. ``CMAKE_VERSION`` using a component-wise test. Version component
  24. values may be 10 or larger so do not attempt to compare version
  25. strings as floating-point numbers.
  26. .. note::
  27. CMake versions prior to 2.8.2 used three components for the
  28. feature level and had no bug-fix component. Release versions
  29. used an even-valued second component, i.e.
  30. ``<major>.<even-minor>.<patch>[-rc<n>]``. Development versions
  31. used an odd-valued second component with the development date as
  32. the third component, i.e. ``<major>.<odd-minor>.<date>``.
  33. The ``CMAKE_VERSION`` variable is defined by CMake 2.6.3 and higher.
  34. Earlier versions defined only the individual component variables.