-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding version information to the main header file #411
Comments
Good point. @vitaut The version information is currently only available in CMake. |
I am thinking of defining a single #define FMT_VERSION MMmmpp as suggested for GCC here, where #define FMT_VERSION 030001 is version 3.0.1. I think it is better than having separate major, minor, and patch macros because it requires awkward comparison: /* Test for GCC > 3.2.0 */
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \
(__GNUC_MINOR__ == 2 && \
__GNUC_PATCHLEVEL__ > 0)) Major, minor, and patch version can be easily extracted from As for CMake, I think it's better to extract version from the header file to avoid duplication. |
Done in f5b1c16. |
(cherry picked from commit f5b1c16) # Conflicts: # CMakeLists.txt
To allow client code rertieve library version instead of hard-coding it somewhere.
Motivation:
Can be in form of preprocessor definitions for integral version components (major, minor etc.) or preformatted string, e. g. "3.0.0". For example, SQLite defines these macros:
The text was updated successfully, but these errors were encountered: