summaryrefslogtreecommitdiffstats
path: root/src/ceph/cmake/modules/Finddpdk.cmake
diff options
context:
space:
mode:
authorQiaowei Ren <qiaowei.ren@intel.com>2018-01-04 13:43:33 +0800
committerQiaowei Ren <qiaowei.ren@intel.com>2018-01-05 11:59:39 +0800
commit812ff6ca9fcd3e629e49d4328905f33eee8ca3f5 (patch)
tree04ece7b4da00d9d2f98093774594f4057ae561d4 /src/ceph/cmake/modules/Finddpdk.cmake
parent15280273faafb77777eab341909a3f495cf248d9 (diff)
initial code repo
This patch creates initial code repo. For ceph, luminous stable release will be used for base code, and next changes and optimization for ceph will be added to it. For opensds, currently any changes can be upstreamed into original opensds repo (https://github.com/opensds/opensds), and so stor4nfv will directly clone opensds code to deploy stor4nfv environment. And the scripts for deployment based on ceph and opensds will be put into 'ci' directory. Change-Id: I46a32218884c75dda2936337604ff03c554648e4 Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
Diffstat (limited to 'src/ceph/cmake/modules/Finddpdk.cmake')
-rw-r--r--src/ceph/cmake/modules/Finddpdk.cmake75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/ceph/cmake/modules/Finddpdk.cmake b/src/ceph/cmake/modules/Finddpdk.cmake
new file mode 100644
index 0000000..343420a
--- /dev/null
+++ b/src/ceph/cmake/modules/Finddpdk.cmake
@@ -0,0 +1,75 @@
+# Try to find dpdk
+#
+# Once done, this will define
+#
+# DPDK_FOUND
+# DPDK_INCLUDE_DIR
+# DPDK_LIBRARIES
+
+find_path(DPDK_INCLUDE_DIR rte_config.h
+ PATH_SUFFIXES dpdk)
+find_library(DPDK_rte_hash_LIBRARY rte_hash)
+find_library(DPDK_rte_kvargs_LIBRARY rte_kvargs)
+find_library(DPDK_rte_mbuf_LIBRARY rte_mbuf)
+find_library(DPDK_rte_ethdev_LIBRARY rte_ethdev)
+find_library(DPDK_rte_mempool_LIBRARY rte_mempool)
+find_library(DPDK_rte_ring_LIBRARY rte_ring)
+find_library(DPDK_rte_eal_LIBRARY rte_eal)
+find_library(DPDK_rte_cmdline_LIBRARY rte_cmdline)
+find_library(DPDK_rte_pmd_bond_LIBRARY rte_pmd_bond)
+find_library(DPDK_rte_pmd_vmxnet3_uio_LIBRARY rte_pmd_vmxnet3_uio)
+find_library(DPDK_rte_pmd_ixgbe_LIBRARY rte_pmd_ixgbe)
+find_library(DPDK_rte_pmd_i40e_LIBRARY rte_pmd_i40e)
+find_library(DPDK_rte_pmd_ring_LIBRARY rte_pmd_ring)
+find_library(DPDK_rte_pmd_af_packet_LIBRARY rte_pmd_af_packet)
+
+set(check_LIBRARIES
+ ${DPDK_rte_hash_LIBRARY}
+ ${DPDK_rte_kvargs_LIBRARY}
+ ${DPDK_rte_mbuf_LIBRARY}
+ ${DPDK_rte_ethdev_LIBRARY}
+ ${DPDK_rte_mempool_LIBRARY}
+ ${DPDK_rte_ring_LIBRARY}
+ ${DPDK_rte_eal_LIBRARY}
+ ${DPDK_rte_cmdline_LIBRARY}
+ ${DPDK_rte_pmd_bond_LIBRARY}
+ ${DPDK_rte_pmd_vmxnet3_uio_LIBRARY}
+ ${DPDK_rte_pmd_ixgbe_LIBRARY}
+ ${DPDK_rte_pmd_i40e_LIBRARY}
+ ${DPDK_rte_pmd_ring_LIBRARY}
+ ${DPDK_rte_pmd_af_packet_LIBRARY})
+
+mark_as_advanced(DPDK_INCLUDE_DIR
+ DPDK_rte_hash_LIBRARY
+ DPDK_rte_kvargs_LIBRARY
+ DPDK_rte_mbuf_LIBRARY
+ DPDK_rte_ethdev_LIBRARY
+ DPDK_rte_mempool_LIBRARY
+ DPDK_rte_ring_LIBRARY
+ DPDK_rte_eal_LIBRARY
+ DPDK_rte_cmdline_LIBRARY
+ DPDK_rte_pmd_bond_LIBRARY
+ DPDK_rte_pmd_vmxnet3_uio_LIBRARY
+ DPDK_rte_pmd_ixgbe_LIBRARY
+ DPDK_rte_pmd_i40e_LIBRARY
+ DPDK_rte_pmd_ring_LIBRARY
+ DPDK_rte_pmd_af_packet_LIBRARY)
+
+if (EXISTS ${WITH_DPDK_MLX5})
+ find_library(DPDK_rte_pmd_mlx5_LIBRARY rte_pmd_mlx5)
+ list(APPEND check_LIBRARIES ${DPDK_rte_pmd_mlx5_LIBRARY})
+ mark_as_advanced(DPDK_rte_pmd_mlx5_LIBRARY)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(dpdk DEFAULT_MSG
+ DPDK_INCLUDE_DIR
+ check_LIBRARIES)
+
+if(DPDK_FOUND)
+if (EXISTS ${WITH_DPDK_MLX5})
+ list(APPEND check_LIBRARIES -libverbs)
+endif()
+ set(DPDK_LIBRARIES
+ -Wl,--whole-archive ${check_LIBRARIES} -Wl,--no-whole-archive)
+endif(DPDK_FOUND)