22 lines
730 B
Text
22 lines
730 B
Text
|
MDEV-31963 cmake: fix libfmt usage
|
||
|
|
||
|
`fmt::detail::make_arg` does not accept temporaries, so the code snippet
|
||
|
checking system libfmt needs to be adjusted.
|
||
|
|
||
|
f4cec369a392c8a6056207012992ad4a5639965a
|
||
|
|
||
|
Index: cmake/libfmt.cmake
|
||
|
--- cmake/libfmt.cmake.orig
|
||
|
+++ cmake/libfmt.cmake
|
||
|
@@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT)
|
||
|
#include <fmt/format-inl.h>
|
||
|
#include <iostream>
|
||
|
int main() {
|
||
|
+ int answer= 42;
|
||
|
fmt::format_args::format_arg arg=
|
||
|
- fmt::detail::make_arg<fmt::format_context>(42);
|
||
|
+ fmt::detail::make_arg<fmt::format_context>(answer);
|
||
|
std::cout << fmt::vformat(\"The answer is {}.\",
|
||
|
fmt::format_args(&arg, 1));
|
||
|
}" HAVE_SYSTEM_LIBFMT)
|