From 56070205e6072d464fd734c410d9a76f231895f4 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 24 Oct 2019 14:14:40 +0800 Subject: [PATCH] cmake: support `Seastar_DPDK=ON` option seastar does not build any 3rd party libraries. but we do. currently, we build DPDK/SPDK when they are enabled for the messenger backend and bluestore backend. in this change, the same function is reused for preparing the DPDK libraries if `Seastar_DPDK` is enabled. probably we should outsource this work to install-deps.sh in future, but before that, let's keep this as a builtin "feature". Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b1295cd0c2a..275a8ebd1746 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -305,6 +305,13 @@ if(WITH_SEASTAR) endmacro () set(Seastar_HWLOC OFF CACHE BOOL "" FORCE) set(Seastar_STD_OPTIONAL_VARIANT_STRINGVIEW ON CACHE BOOL "" FORCE) + if(Seastar_DPDK) + find_package(dpdk QUIET) + if(NOT DPDK_FOUND) + include(BuildDPDK) + build_dpdk(${CMAKE_BINARY_DIR}/src/dpdk) + endif() + endif() set(Seastar_CXX_FLAGS "-Wno-error;-Wno-sign-compare;-Wno-attributes;-Wno-pessimizing-move;-Wno-address-of-packed-member" CACHE STRING "" FORCE) add_subdirectory(seastar) # create the directory so cmake won't complain when looking at the imported -- 2.47.3