2016-09-27 19:01:08 +00: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 19:44:54 +00:00
|
|
|
#ifndef cmVersion_h
|
|
|
|
#define cmVersion_h
|
|
|
|
|
2016-08-16 23:08:13 +00:00
|
|
|
#include <cm_kwiml.h>
|
2004-10-22 19:44:54 +00: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 20:17:07 +00:00
|
|
|
static unsigned int GetMajorVersion();
|
|
|
|
static unsigned int GetMinorVersion();
|
|
|
|
static unsigned int GetPatchVersion();
|
2010-04-23 13:44:23 +00:00
|
|
|
static unsigned int GetTweakVersion();
|
2009-03-05 20:17:07 +00:00
|
|
|
static const char* GetCMakeVersion();
|
2004-10-22 19:44:54 +00:00
|
|
|
};
|
|
|
|
|
2014-02-10 19:52:59 +00: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 20:03:42 +00:00
|
|
|
#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000)
|
2016-05-16 14:34:04 +00: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 20:17:07 +00:00
|
|
|
|
2004-10-22 19:44:54 +00:00
|
|
|
#endif
|