Details
-
Bug
-
Status: In Review (View Workflow)
-
Critical
-
Resolution: Unresolved
-
12.0
Description
This patch improves libfmt detection by calling find_package(fmt QUIET) first when WITH_LIBFMT is set to system or auto. If a system libfmt is located successfully, we skip the custom source-compile snippet. Otherwise, we proceed with the old detection logic (compile test) and finally fall back to the bundled library if needed. This change makes it easier for package managers (e.g., Homebrew) or system environments that already have a modern fmt installed to integrate with MariaDB, without having to override CMake variables manually.
Before this patch, the logic always set CMAKE_REQUIRED_INCLUDES to the bundled copy’s include directory and ran a snippet test, failing if the user had removed or disabled the bundled directory. Now, if a system installation is discoverable via CMake config files, MariaDB can be built cleanly against that library.
Pull request: https://github.com/MariaDB/server/pull/3786