cmake/Source/cmVersion.h

45 lines
1.5 KiB
C
Raw Normal View History

2009-10-04 10:30:41 +03:00
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
2009-10-04 10:30:41 +03:00
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
2009-10-04 10:30:41 +03:00
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmVersion_h
#define cmVersion_h
#include "cmStandardIncludes.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. */
#define CMake_VERSION_ENCODE__BASE cmIML_INT_UINT64_C(100000000)
2009-10-04 10:30:41 +03:00
#define CMake_VERSION_ENCODE(major, minor, patch) \
2014-08-03 19:52:23 +02:00
((((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