summaryrefslogtreecommitdiffstats
path: root/build-data
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-07-30 12:45:07 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-08-17 22:14:39 +0000
commit612dd6a955e44d2c0fed1801fb8de585ca695c63 (patch)
treea49c3004a7122077a884dce483daebc280199761 /build-data
parent5d82d2f1495e189c4687a6462850cbbb3ea38b17 (diff)
CMake as an alternative to autotools (experimental)
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'build-data')
-rw-r--r--build-data/packages/vpp.mk16
-rw-r--r--build-data/platforms/vpp.mk3
2 files changed, 19 insertions, 0 deletions
diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk
index 19e32efdc24..230f8904786 100644
--- a/build-data/packages/vpp.mk
+++ b/build-data/packages/vpp.mk
@@ -12,6 +12,7 @@
# limitations under the License.
vpp_source = src
+ifneq ($(vpp_uses_cmake),yes)
ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
vpp_configure_args = --enable-dpdk-shared
@@ -49,3 +50,18 @@ endif
ifeq ($($(PLATFORM)_enable_tests),yes)
vpp_configure_args += --enable-tests
endif
+
+else
+vpp_configure_depend += dpdk-install
+vpp_configure = \
+ cd $(PACKAGE_BUILD_DIR) && \
+ cmake -G Ninja \
+ -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR) \
+ -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)" \
+ -DDPDK_INCLUDE_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/include" \
+ -DDPDK_LIB_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/lib" \
+ $(call find_source_fn,$(PACKAGE_SOURCE))
+#vpp_make_args = --no-print-directory
+vpp_build = cmake --build $(PACKAGE_BUILD_DIR)
+vpp_install = cmake --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'
+endif
diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 0687946dbb9..8da8c5eed3f 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -23,6 +23,9 @@ vpp_native_tools = vppapigen
vpp_uses_dpdk = yes
+# use cmake as an alternative to autotools
+# vpp_uses_cmake = yes
+
# Uncoment to enable building unit tests
# vpp_enable_tests = yes