Add macros for retrieving Major/Minor/Patch from FMT_VERSION

This commit is contained in:
Stephen Lane-Walsh 2021-10-24 02:41:44 -04:00
parent 3b6e409cd8
commit 9d6677b74b
No known key found for this signature in database
GPG Key ID: 5AAE08965135302C

View File

@ -18,6 +18,10 @@
// The fmt library version in the form major * 10000 + minor * 100 + patch.
#define FMT_VERSION 80001
#define FMT_VERSION_MAJOR (FMT_VERSION / 10000)
#define FMT_VERSION_MINOR ((FMT_VERSION % 10000) / 100)
#define FMT_VERSION_PATCH ((FMT_VERSION % 10000) % 100)
#if defined (__clang__ ) && !defined(__ibmxl__)
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
#else