Skip to content

Commit

Permalink
MDEV-32815 test main.func_sformat Locale + test failures under Fedora…
Browse files Browse the repository at this point in the history
… 39 (fmt-10.0.0+)

FMT_STATIC_THOUSANDS_SEPARATOR stopped working in 10.0.0
Let's not use this fmt version for now
  • Loading branch information
vuvova committed Feb 1, 2024
1 parent dd95c58 commit b5c367c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmake/libfmt.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INCLUDE (CheckCXXSourceCompiles)
INCLUDE (CheckCXXSourceRuns)
INCLUDE (ExternalProject)

SET(WITH_LIBFMT "auto" CACHE STRING
Expand Down Expand Up @@ -27,17 +27,15 @@ ENDMACRO()
MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES(
CHECK_CXX_SOURCE_RUNS(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1
#include <fmt/format-inl.h>
#include <iostream>
int main() {
int answer= 42;
int answer= 4321;
fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(answer);
std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1));
return fmt::vformat(\"{:L}\", fmt::format_args(&arg, 1)).compare(\"4,321\");
}" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF()
Expand Down

0 comments on commit b5c367c

Please sign in to comment.