mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-16 06:54:29 +08:00
45 lines
1.6 KiB
C
45 lines
1.6 KiB
C
/* This is CMake-template for libmdbx's version.c
|
|
******************************************************************************/
|
|
|
|
#include "internals.h"
|
|
|
|
#if MDBX_VERSION_MAJOR != ${MDBX_VERSION_MAJOR} || MDBX_VERSION_MINOR != ${MDBX_VERSION_MINOR}
|
|
#error "API version mismatch! Had `git fetch --tags` done?"
|
|
#endif
|
|
|
|
static const char sourcery[] = MDBX_STRINGIFY(MDBX_BUILD_SOURCERY);
|
|
|
|
__dll_export
|
|
#ifdef __attribute_used__
|
|
__attribute_used__
|
|
#elif defined(__GNUC__) || __has_attribute(__used__)
|
|
__attribute__((__used__))
|
|
#endif
|
|
#ifdef __attribute_externally_visible__
|
|
__attribute_externally_visible__
|
|
#elif (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(__externally_visible__)
|
|
__attribute__((__externally_visible__))
|
|
#endif
|
|
const struct MDBX_version_info mdbx_version = {
|
|
${MDBX_VERSION_MAJOR},
|
|
${MDBX_VERSION_MINOR},
|
|
${MDBX_VERSION_PATCH},
|
|
${MDBX_VERSION_TWEAK},
|
|
"@MDBX_VERSION_PRERELEASE@", /* pre-release suffix of SemVer
|
|
@MDBX_VERSION_PURE@ */
|
|
{"@MDBX_GIT_TIMESTAMP@", "@MDBX_GIT_TREE@", "@MDBX_GIT_COMMIT@", "@MDBX_GIT_DESCRIBE@"},
|
|
sourcery};
|
|
|
|
__dll_export
|
|
#ifdef __attribute_used__
|
|
__attribute_used__
|
|
#elif defined(__GNUC__) || __has_attribute(__used__)
|
|
__attribute__((__used__))
|
|
#endif
|
|
#ifdef __attribute_externally_visible__
|
|
__attribute_externally_visible__
|
|
#elif (defined(__GNUC__) && !defined(__clang__)) || __has_attribute(__externally_visible__)
|
|
__attribute__((__externally_visible__))
|
|
#endif
|
|
const char *const mdbx_sourcery_anchor = sourcery;
|