Commit ba7287df authored by Sergei Golubchik's avatar Sergei Golubchik

disallow old <7.0 fmt

libfmt 6.1 is in Ubuntu focal repositories.
it's easy to compile with 6.1 by doing
#define detail internal

but 6.1 also produces different results in main.func_sformat
and we want MariaDB to behave identically everywhere.
parent 513c8b4c
......@@ -28,12 +28,15 @@ MACRO (CHECK_LIBFMT)
#include <fmt/format-inl.h>
#include <iostream>
int main() {
std::cout << fmt::format(\"The answer is {}.\", 42);
fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(42);
std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT)
ENDIF()
IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled")
IF (WITH_LIBFMT STREQUAL "system")
MESSAGE(FATAL_ERROR "system libfmt library is not found")
MESSAGE(FATAL_ERROR "system libfmt library is not found or unusable")
ENDIF()
BUNDLE_LIBFMT()
ELSE()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment