Commit b5c367cd authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-32815 test main.func_sformat Locale + test failures under Fedora 39 (fmt-10.0.0+)

FMT_STATIC_THOUSANDS_SEPARATOR stopped working in 10.0.0
Let's not use this fmt version for now
parent dd95c58b
INCLUDE (CheckCXXSourceCompiles) INCLUDE (CheckCXXSourceRuns)
INCLUDE (ExternalProject) INCLUDE (ExternalProject)
SET(WITH_LIBFMT "auto" CACHE STRING SET(WITH_LIBFMT "auto" CACHE STRING
...@@ -27,17 +27,15 @@ ENDMACRO() ...@@ -27,17 +27,15 @@ ENDMACRO()
MACRO (CHECK_LIBFMT) MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto") IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR}) SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES( CHECK_CXX_SOURCE_RUNS(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ',' "#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1 #define FMT_HEADER_ONLY 1
#include <fmt/format-inl.h> #include <fmt/format-inl.h>
#include <iostream>
int main() { int main() {
int answer= 42; int answer= 4321;
fmt::format_args::format_arg arg= fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(answer); fmt::detail::make_arg<fmt::format_context>(answer);
std::cout << fmt::vformat(\"The answer is {}.\", return fmt::vformat(\"{:L}\", fmt::format_args(&arg, 1)).compare(\"4,321\");
fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT) }" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES) SET(CMAKE_REQUIRED_INCLUDES)
ENDIF() ENDIF()
......
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