summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-09-18 13:53:00 +0200
committerSergei Golubchik <serg@mariadb.org>2021-09-18 13:53:00 +0200
commit55dd9dca9af174f9bad3d090901062d6f8e9c6c4 (patch)
tree5518fe2e8350268cb3828e13831518e643dd0c7f
parent53b2c1f4664a3cb90f583979d9aa2771b7e1c98d (diff)
downloadmariadb-git-preview-10.7-MDEV-25015-sformat_triggerBB.tar.gz
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.
-rw-r--r--cmake/libfmt.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake
index 27ac5a6ff85..99e7b0d9aab 100644
--- a/cmake/libfmt.cmake
+++ b/cmake/libfmt.cmake
@@ -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()