]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: build seastar dpdk from src/seastar/dpdk 31426/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Wed, 6 Nov 2019 09:34:32 +0000 (17:34 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 13 Nov 2019 07:53:43 +0000 (15:53 +0800)
src/spdk/dpdk and src/seastar/dpdk are both at their private branches
with project-specific modifications, so select proper dpdk source
directory according to flags WITH_SPDK and Seastar_DPDK.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
cmake/modules/BuildDPDK.cmake

index fbe42b62e0dfd11298082d58ad1fc00fec50760e..f858bedc91c116345405761cb67159d8f702e9bf 100644 (file)
@@ -79,9 +79,18 @@ function(do_build_dpdk dpdk_dir)
     set(make_cmd "${MAKE_EXECUTABLE}")
   endif()
 
+  if(Seastar_DPDK AND WITH_SPDK)
+    message(FATAL_ERROR "not able to build DPDK with "
+      "both Seastar_DPDK and WITH_SPDK enabled")
+  elseif(Seastar_DPDK)
+    set(dpdk_source_dir ${CMAKE_SOURCE_DIR}/src/seastar/dpdk)
+  else() # WITH_SPDK or WITH_DPDK is enabled
+    set(dpdk_source_dir ${CMAKE_SOURCE_DIR}/src/spdk/dpdk)
+  endif()
+
   include(ExternalProject)
   ExternalProject_Add(dpdk-ext
-    SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/spdk/dpdk
+    SOURCE_DIR ${dpdk_source_dir}
     CONFIGURE_COMMAND ${make_cmd} config O=${dpdk_dir} T=${target}
     BUILD_COMMAND ${make_cmd} O=${dpdk_dir} CC=${CMAKE_C_COMPILER} EXTRA_CFLAGS=-fPIC
     BUILD_IN_SOURCE 1