From: Kefu Chai Date: Thu, 24 Oct 2019 06:14:40 +0000 (+0800) Subject: cmake: support `Seastar_DPDK=ON` option X-Git-Tag: v15.1.0~1167^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56070205e6072d464fd734c410d9a76f231895f4;p=ceph.git 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 --- 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