diff --git a/CMakeLists.txt b/CMakeLists.txt index f4d9772..87f5201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(LIBTOOL_REVISION 3) set(LIBTOOL_AGE 2) # VERSION is XYYYZZ X: Major Y Minor Z PATCH -set(GOTCHA_VERSION 100006) +set(GOTCHA_VERSION "(1, 0, 6)") set(DEFAULT_SYMBOL_VISIBILITY hidden) diff --git a/cmake/gotcha_config.h.in b/cmake/gotcha_config.h.in index d69d271..7b8538c 100644 --- a/cmake/gotcha_config.h.in +++ b/cmake/gotcha_config.h.in @@ -1,10 +1,10 @@ -#ifndef GOTCHA_CONFIG_HPP -#define GOTCHA_CONFIG_HPP +#ifndef GOTCHA_CONFIG_H +#define GOTCHA_CONFIG_H -#define GOTCHA_VERSION @GOTCHA_VERSION@ +#define GOTCHA_GET_VERSION(MAJOR, MINOR, PATCH) MAJOR * 100000 + MINOR * 100 + PATCH +#define GOTCHA_VERSION GOTCHA_GET_VERSION @GOTCHA_VERSION@ #define GOTCHA_VERSION_MAJOR (GOTCHA_VERSION / 100000) #define GOTCHA_VERSION_MINOR ((GOTCHA_VERSION / 100) % 1000) #define GOTCHA_VERSION_PATCH (GOTCHA_VERSION % 100) -#define GOTCHA_GET_VERSION(MAJOR, MINOR, PATCH) MAJOR * 100000 + MINOR * 100 + PATCH -#endif /* HPC_AIO_CONFIG_H */ +#endif /* GOTCHA_CONFIG_H */ diff --git a/docs/api.rst b/docs/api.rst index db0479d..a67392b 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -183,6 +183,7 @@ Using Gotcha Version Macros --------------------------- The source version of GOTCHA is defined by the `GOTCHA_VERSION` macro which uses the XYYYZZ format. +**Available since version 1.0.7.** Here, X signifies the major version, Y is the minor version, and Z is the patch. Additionally, we define `GOTCHA_VERSION_MAJOR`, `GOTCHA_VERSION_MINOR`, and `GOTCHA_VERSION_PATCH` macros for convienience. The codes can use the macros like