]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: update to accommodate seastar changes
authorKefu Chai <kchai@redhat.com>
Mon, 10 Dec 2018 14:55:08 +0000 (22:55 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 17 Dec 2018 13:05:05 +0000 (21:05 +0800)
- seastar now works with fmt 5.2.1
- seastar now contains fmt as a submodule, so use it instead of
  using our own submodule
- seastar now create include directory under gen/include
- we use std::option<> when using seastar, so enable
  Seastar_STD_OPTIONAL_VARIANT_STRINGVIEW accordingly.

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

index ce62b8e4e44eaaee88a4e3de891a899b4e8b6d50..6e729edb91c8f01c1f6ef94af54c15fa58e0edac 100644 (file)
@@ -277,16 +277,10 @@ include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/xxHash")
 include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rapidjson/include")
 
 if(WITH_SEASTAR)
-  find_package(fmt 4.0.0 QUIET)
+  find_package(fmt 5.2.1 QUIET)
   if(NOT fmt_FOUND)
     message(STATUS "Could not find fmt, will build it")
-    add_subdirectory(fmt)
-  elseif(fmt_VERSION VERSION_GREATER_EQUAL 5.0.0)
-    message(WARNING "Could NOT find fmt: "
-      "Found unsuitable version \"${fmt_VERSION}\", "
-      "but required is at most \"5.0.0\" (found ${fmt_INCLUDE_DIR}). "
-      "Will build it")
-    add_subdirectory(fmt)
+    add_subdirectory(seastar/fmt)
   endif()
   find_package(c-ares 1.13.0 QUIET)
   if(NOT c-ares_FOUND)
@@ -300,10 +294,11 @@ if(WITH_SEASTAR)
     endif()
   endmacro ()
   set(Seastar_HWLOC OFF CACHE BOOL "" FORCE)
+  set(Seastar_STD_OPTIONAL_VARIANT_STRINGVIEW ON CACHE BOOL "" FORCE)
   add_subdirectory(seastar)
   # create the directory so cmake won't complain when looking at the imported
   # target: Seastar exports this directory created at build-time
-  file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen")
+  file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/seastar/gen/include")
   add_subdirectory(crimson)
 endif()