From: Adam Emerson Date: Sat, 28 Oct 2023 17:42:59 +0000 (-0400) Subject: build: Add `WITH_SYSTEM_FMT` option X-Git-Tag: v19.0.0~212^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=421bf61fee35cb8158b4e7ee8a8e40a4089554d9;p=ceph-ci.git build: Add `WITH_SYSTEM_FMT` option The `WITH_SYSTEM_FMT` option builds against system fmt and will fail if a suitable version is not found. It is defaulted to `OFF`. Signed-off-by: Adam Emerson --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index deb27a1c36c..dca5e6e6d4a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -326,7 +326,10 @@ if(NOT TARGET RapidJSON::RapidJSON) endif() option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF) -find_package(fmt 8.1.1...<10.0.0) +option(WITH_SYSTEM_FMT "build against system fmt" OFF) +if(WITH_SYSTEM_FMT) + find_package(fmt 8.1.1...<10.0.0 REQUIRED) +endif() if(fmt_FOUND) message(STATUS "Building with system fmt.") if (WITH_FMT_HEADER_ONLY)