Skip to content

Commit

Permalink
cmake: update to accommodate seastar changes
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
tchaikov committed Dec 17, 2018
1 parent 751528a commit ae5a9cb
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

Expand Down

0 comments on commit ae5a9cb

Please sign in to comment.