a WITH_FMT_HEADER_ONLY cmake option controls which version of the
library to use. individual sources/targets shouldn't override that, or
they'll end up including/linking against both versions
Fixes: https://tracker.ceph.com/issues/58953
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
d4ae3d0db857766ba38656d2c5c523883e518879)
#include <optional>
#include <string>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#include "include/buffer.h"
#include <boost/container/flat_set.hpp>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#if FMT_VERSION >= 90000
#include <fmt/ostream.h>
#include "common/ceph_time.h"
#include "common/Formatter.h"
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#include "rgw/rgw_basic_types.h"
#include "librbd/migration/HttpProcessorInterface.h"
#include <boost/beast/http.hpp>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/chrono.h>
#include <fmt/format.h>
#include "cephfs_features.h"
#include "mdstypes.h"
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
static const std::array feature_names
add_library(rgw_common STATIC ${librgw_common_srcs})
-target_compile_definitions(rgw_common
- PUBLIC "FMT_HEADER_ONLY")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wimplicit-const-int-float-conversion"
#include <boost/thread/shared_mutex.hpp>
#include <boost/variant.hpp>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#include "common/ceph_time.h"
#include <semaphore.h> // XXX kill this?
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include "fmt/include/fmt/format.h"
#include "include/rados/librgw.h"
#include <sstream>
#include <string>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#include "include/rados/librados.hpp"
#include <iostream>
#include <string_view>
-#undef FMT_HEADER_ONLY
-#define FMT_HEADER_ONLY 1
#include <fmt/format.h>
#include "include/types.h"