[v3,3/4] examples: stop processing build file if build is impossible
Checks
Commit Message
Once it has been determined that an example cannot be built, there is
little point in continuing to process the meson.build file for that
example, so we can use subdir_done() to return to the calling file.
This can potentially prevent problems where later statement in the file
may cause an error on systems where the app cannot be built, e.g. on
Windows or FreeBSD.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/distributor/meson.build | 3 +++
examples/ethtool/meson.build | 4 ++++
examples/ioat/meson.build | 3 +++
examples/ip_pipeline/meson.build | 4 ++++
examples/kni/meson.build | 4 ++++
examples/l2fwd-cat/meson.build | 4 ++++
examples/ntb/meson.build | 2 ++
examples/performance-thread/l3fwd-thread/meson.build | 4 ++++
examples/performance-thread/pthread_shim/meson.build | 4 ++++
examples/pipeline/meson.build | 4 ++++
examples/vdpa/meson.build | 2 ++
examples/vhost/meson.build | 2 ++
examples/vhost_blk/meson.build | 2 ++
examples/vhost_crypto/meson.build | 4 ++++
14 files changed, 46 insertions(+)
@@ -8,6 +8,9 @@
# require the power library
build = dpdk_conf.has('RTE_LIB_POWER')
+if not build
+ subdir_done()
+endif
allow_experimental_apis = true
deps += ['distributor', 'power']
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = is_linux
+if not build
+ subdir_done()
+endif
+
sources = files('lib/rte_ethtool.c',
'ethtool-app/ethapp.c',
'ethtool-app/main.c')
@@ -8,6 +8,9 @@
allow_experimental_apis = true
build = dpdk_conf.has('RTE_RAW_IOAT')
+if not build
+ subdir_done()
+endif
deps += ['raw_ioat']
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = cc.has_header('sys/epoll.h')
+if not build
+ subdir_done()
+endif
+
deps += ['pipeline', 'bus_pci']
allow_experimental_apis = true
sources = files(
@@ -8,6 +8,10 @@
# this app can be built if-and-only-if KNI library is buildable
build = dpdk_conf.has('RTE_LIB_KNI')
+if not build
+ subdir_done()
+endif
+
deps += ['kni', 'bus_pci']
sources = files(
'main.c'
@@ -8,6 +8,10 @@
pqos = cc.find_library('pqos', required: false)
build = pqos.found()
+if not build
+ subdir_done()
+endif
+
ext_deps += pqos
allow_experimental_apis = true
cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
@@ -9,7 +9,9 @@
allow_experimental_apis = true
if not is_linux
build = false
+ subdir_done()
endif
+
deps += 'rawdev'
cflags += ['-D_FILE_OFFSET_BITS=64']
sources = files(
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = dpdk_conf.has('RTE_ARCH_X86_64')
+if not build
+ subdir_done()
+endif
+
deps += ['timer', 'lpm']
allow_experimental_apis = true
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64')
+if not build
+ subdir_done()
+endif
+
deps += ['timer']
allow_experimental_apis = true
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = cc.has_header('sys/epoll.h')
+if not build
+ subdir_done()
+endif
+
deps += ['pipeline', 'bus_pci']
allow_experimental_apis = true
sources = files(
@@ -8,7 +8,9 @@
if not is_linux
build = false
+ subdir_done()
endif
+
deps += 'vhost'
allow_experimental_apis = true
sources = files(
@@ -8,7 +8,9 @@
if not is_linux
build = false
+ subdir_done()
endif
+
deps += 'vhost'
allow_experimental_apis = true
sources = files(
@@ -8,10 +8,12 @@
if not is_linux
build = false
+ subdir_done()
endif
if not cc.has_header('linux/virtio_blk.h')
build = false
+ subdir_done()
endif
deps += 'vhost'
@@ -7,6 +7,10 @@
# DPDK instance, use 'make'
build = dpdk_conf.has('RTE_LIB_VHOST')
+if not build
+ subdir_done()
+endif
+
allow_experimental_apis = true
deps += ['vhost', 'cryptodev']
sources = files(