diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:33:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:33:02 +0000 |
commit | 4fa488fb0159c629483b7994aa84e73926b132b9 (patch) | |
tree | 182a19db69cdcb92be54cc6a5b0b9bfab28f80fd /cmake/libfmt.cmake | |
parent | Adding debian version 1:10.11.6-2. (diff) | |
download | mariadb-4fa488fb0159c629483b7994aa84e73926b132b9.tar.xz mariadb-4fa488fb0159c629483b7994aa84e73926b132b9.zip |
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/libfmt.cmake')
-rw-r--r-- | cmake/libfmt.cmake | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake index 70b6a072..da347942 100644 --- a/cmake/libfmt.cmake +++ b/cmake/libfmt.cmake @@ -1,4 +1,4 @@ -INCLUDE (CheckCXXSourceCompiles) +INCLUDE (CheckCXXSourceRuns) INCLUDE (ExternalProject) SET(WITH_LIBFMT "auto" CACHE STRING @@ -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() |