cmake/Source/cmVersion.h

35 lines
1.1 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmVersion_h
#define cmVersion_h
2017-07-20 19:35:53 +02:00
#include "cm_kwiml.h"
/** \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-10-04 10:30:41 +03:00
static unsigned int GetMajorVersion();
static unsigned int GetMinorVersion();
static unsigned int GetPatchVersion();
2010-06-23 01:18:35 +03:00
static unsigned int GetTweakVersion();
2009-10-04 10:30:41 +03:00
static const char* GetCMakeVersion();
};
2014-08-03 19:52:23 +02: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. */
2016-03-13 13:35:51 +01:00
#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000)
2016-07-09 11:21:54 +02: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-10-04 10:30:41 +03:00
#endif