]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: set WITH_FMT_VERSION as a STRING option 49489/head
authorKefu Chai <tchaikov@gmail.com>
Sun, 18 Dec 2022 02:47:42 +0000 (10:47 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 18 Dec 2022 02:47:42 +0000 (10:47 +0800)
option() defines a boolean, so its default value cannot be populated
to find_package() as expected. so we need to set it as a cached STRING
variable.

this addresses the regression introduced by 051ec194df16927187cbe4b26dacd06c31fa186a

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/CMakeLists.txt

index f29d173b3cdf3ec8282fe0db1ad7d60083c34589..e3aa15f4638ec383976e6f3094cf09ee7a9521af 100644 (file)
@@ -321,7 +321,8 @@ if(NOT TARGET RapidJSON::RapidJSON)
 endif()
 
 option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
-option(WITH_FMT_VERSION "build with fmt version" 7.0.0)
+set(WITH_FMT_VERSION "7.0.0" CACHE
+  STRING "build with fmt version")
 find_package(fmt ${WITH_FMT_VERSION} QUIET)
 if(fmt_FOUND)
   include_directories(SYSTEM "${fmt_INCLUDE_DIR}")