From: Casey Bodley Date: Sun, 8 Oct 2017 18:46:26 +0000 (-0400) Subject: cmake: add WITH_SEASTAR option X-Git-Tag: v14.0.1~1153^2~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=37de3cad4d1428b9a8127f554e385410c6605e35;p=ceph-ci.git cmake: add WITH_SEASTAR option Signed-off-by: Casey Bodley --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d557536c205..77b7438515a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -581,6 +581,9 @@ if (WITH_SYSTEM_ROCKSDB) find_package(rocksdb 5.8 REQUIRED) endif() +option(WITH_SEASTAR "Build seastar components") +set(HAVE_SEASTAR ${WITH_SEASTAR}) + # Boost option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF) @@ -595,6 +598,7 @@ endif() if(WITH_BOOST_CONTEXT) list(APPEND BOOST_COMPONENTS context coroutine) endif() +list(APPEND BOOST_COMPONENTS test timer) set(Boost_USE_MULTITHREADED ON) # require minimally the bundled version diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e26fc79ce6f..4fa6b1eaf98 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-null-sentinel -Woverloaded-virtual") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-new-ttp-matching") - if(NOT WITH_OSD_INSTRUMENT_FUNCTIONS) + if(NOT WITH_OSD_INSTRUMENT_FUNCTIONS AND NOT HAVE_SEASTAR) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang) @@ -387,6 +387,10 @@ include_directories("${CMAKE_SOURCE_DIR}/src/dmclock/support/src") # needed for source files that friend unit tests (e.g., using FRIEND_TEST) include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/googletest/googletest/include") +if(WITH_SEASTAR) + add_subdirectory(seastar) +endif() + set(xio_common_srcs) if(HAVE_XIO) list(APPEND xio_common_srcs diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index e6f66e73c2d..42800a5ccdd 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -345,4 +345,7 @@ /* Defined if Intel QAT compress/decompress is supported */ #cmakedefine HAVE_QATZIP +/* Define if seastar is available. */ +#cmakedefine HAVE_SEASTAR + #endif /* CONFIG_H */