From ae5a9cbce52d1c1d6538c7cb258b10571ff92c3c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 10 Dec 2018 22:55:08 +0800 Subject: [PATCH] cmake: update to accommodate seastar changes - 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 --- src/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ce62b8e4e44..6e729edb91c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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() -- 2.39.5