Skip to content

Commit

Permalink
MDEV-31963 cmake: fix libfmt usage
Browse files Browse the repository at this point in the history
`fmt::detail::make_arg` does not accept temporaries, so the code snippet
checking system libfmt needs to be adjusted.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
  • Loading branch information
ZhongRuoyu authored and grooverdan committed Aug 28, 2023
1 parent bf3b787 commit f4cec36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/libfmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f4cec36

Please sign in to comment.