resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmVersion.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include <cm3p/kwiml/int.h>
6
7 /** \class cmVersion
8  * \brief Helper class for providing CMake and CTest version information.
9  *
10  * Finds all version related information.
11  */
12 class cmVersion
13 {
14 public:
15   /**
16    * Return major and minor version numbers for cmake.
17    */
18   static unsigned int GetMajorVersion();
19   static unsigned int GetMinorVersion();
20   static unsigned int GetPatchVersion();
21   static unsigned int GetTweakVersion();
22   static const char* GetCMakeVersion();
23 };
24
25 /* Encode with room for up to 1000 minor releases between major releases
26    and to encode dates until the year 10000 in the patch level.  */
27 #define CMake_VERSION_ENCODE_BASE KWIML_INT_UINT64_C(100000000)
28 #define CMake_VERSION_ENCODE(major, minor, patch)                             \
29   ((((major)*1000u) * CMake_VERSION_ENCODE_BASE) +                            \
30    (((minor) % 1000u) * CMake_VERSION_ENCODE_BASE) +                          \
31    (((patch) % CMake_VERSION_ENCODE_BASE)))