2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2004-10-22 23:44:54 +04:00
|
|
|
#ifndef cmVersion_h
|
|
|
|
#define cmVersion_h
|
|
|
|
|
2016-08-17 02:08:13 +03:00
|
|
|
#include <cm_kwiml.h>
|
2004-10-22 23:44:54 +04:00
|
|
|
|
|
|
|
/** \class cmVersion
|
|
|
|
* \brief Helper class for providing CMake and CTest version information.
|
|
|
|
*
|
|
|
|
* Finds all version related information.
|
|
|
|
*/
|
|
|
|
class cmVersion
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Return major and minor version numbers for cmake.
|
|
|
|
*/
|
2009-03-05 23:17:07 +03:00
|
|
|
static unsigned int GetMajorVersion();
|
|
|
|
static unsigned int GetMinorVersion();
|
|
|
|
static unsigned int GetPatchVersion();
|
2010-04-23 17:44:23 +04:00
|
|
|
static unsigned int GetTweakVersion();
|
2009-03-05 23:17:07 +03:00
|
|
|
static const char* GetCMakeVersion();
|
2004-10-22 23:44:54 +04:00
|
|
|
};
|
|
|
|
|
2014-02-10 23:52:59 +04:00
|
|
|
/* Encode with room for up to 1000 minor releases between major releases
|
|
|
|
and to encode dates until the year 10000 in the patch level. */
|
2015-12-17 23:03:42 +03:00
|
|
|
#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000)
|
2016-05-16 17:34:04 +03:00
|
|
|
#define CMake_VERSION_ENCODE(major, minor, patch) \
|
|
|
|
((((major)*1000u) * CMake_VERSION_ENCODE__BASE) + \
|
|
|
|
(((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \
|
|
|
|
(((patch) % CMake_VERSION_ENCODE__BASE)))
|
2009-03-05 23:17:07 +03:00
|
|
|
|
2004-10-22 23:44:54 +04:00
|
|
|
#endif
|