All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Fix build with latest clang
- Minor documentation fixes
- Build system improvements
- Typo fixes in docs
- Support for GNUInstallDirs in CMake
- CMake corrections
- Core algorithm reworked and simplified, which brings many small improvements
- Numbers of arbitrary lengths are now compared correctly
- Versions are now split more uniformly, so now
1.0alpha1==1.0.alpha1==1.0alpha.1==1.0.alpha.1 - Any number of alphabetic/numeric compoments are now allowed (
1a2b3c4is no longer effectively trimmed to1a2)
- Implement
VERSIONFLAG_LOWER_BOUNDandVERSIONFLAG_UPPER_BOUNDflags - Added
version_sortandversion_explain(not installed) utilities, useful for debugging - Removed deprecated
version_signatureAPI
- Add support for
erratakeyword as post-release.
- Modernized CMake code, added support for CMake export mechanism, so it's now super easy to use libversion from CMake
- Added export header so shared library can now be used on Windows
- Better handling of deprecated APIs
- Fixed library name conflicts on Windows
- Fixed undefined behavior in string comparison
- Fixed installation for out-of-source builds
- Documentation updates
- Deprecated
version_compare3()as well, as it would create ambiguities for higher level language wrappers - Exposed libversion version to consumer code via
LIBVERSION_VERSION_ATLEASTmacro
- API cleanup: all
version_compare*methods are now replaced withversion_compare2(),version_compare3(), andversion_compare4()which are consistent and suggest the number of arguments.version_compare_simple(),version_compare_flags(), andversion_compare_flags2()are thus deprecated and will be removed in further releases. - Also deprecate
version_signature_simple()which had no practical use.
- Implemented
version_compare_flags2()4-argument function which allows to specify flags for either compared version independently, without the need to squish them into the single argument - Added shared library
- Implemented
VERSIONFLAG_ANY_IS_PATCHflag which makes any alphabetic characters encountered in versions treated as post-release.
- Allow to specify
P_IS_PATCHflag to each comparison argument separately
- Handle
pl("patchlevel") keyword as post-release.
- Handle any keyword which starts with
postequally (as post-release). This is now also consistent with how keywords starting withpreare handled.
- Added special handling of
postkeyword (as post-release, similar topatch)
- Add
version_signature_single()function to generate format signature for a version string - Header file renamed to
libversion/version.h
- Add
version_compare_flags(), equivalent ofversion_compare_simple()which takes additionalflagsargument used to fine tune its behavior. - Implemented
VERSIONFLAG_P_IS_PATCHflag which affects the handling ofpletter encountered in versions.
- Enable position independent code so libversion can be used with shared libraries
- Improved handling of keywords, including fixed handling of
patch - Improved documentation
- Initial release featuring single function
version_compare_simple(v1, v2)