]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: fix Finddpdk.cmake 23620/head
authorKefu Chai <kchai@redhat.com>
Fri, 17 Aug 2018 04:27:49 +0000 (12:27 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 17 Aug 2018 07:16:22 +0000 (15:16 +0800)
commit303e3c4a6cf57cee8ca998111fd7c2215b1a9bae
tree581e36a7684f9f7010e52bfa04c2ff46b9b62c99
parent18dc98e3f0b6dfabb37e2cb2d17c73e3bc4e291a
cmake: fix Finddpdk.cmake

* add dpdk::dpdk if dpdk is built or found, as seastar checks for
  it before adding its component libraries. if user installs libdpdk
  and builds WITH_SEASTAR=ON or WITH_DPDK=ON, cmake fails to configure
  the building system without this fix.
* add dpdk::cflags target for populating the -march=<arch> compile
  option.
* also use pkg-config for finding dpdk.
* link common_async_dpdk against dpdk::dpdk instead

please note, the reason why we can remove the "-march=native" compile
option from Finddpdk.cmake, is that the distro shipped header files
are "generic" in the sense of "-march=<ARCH>", they do not enable
the arch specific intrinsic by default, hence the source files
including them do not need specific compiler options.

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/BuildDPDK.cmake
cmake/modules/Finddpdk.cmake
src/msg/CMakeLists.txt