]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: support `Seastar_DPDK=ON` option 31110/head
authorKefu Chai <kchai@redhat.com>
Thu, 24 Oct 2019 06:14:40 +0000 (14:14 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 24 Oct 2019 09:54:05 +0000 (17:54 +0800)
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 <kchai@redhat.com>
src/CMakeLists.txt

index 3b1295cd0c2a1efbfc27b5ff7e6baca089b95c95..275a8ebd1746596bfefd646baba4aede2b7e6051 100644 (file)
@@ -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