examples: stop processing meson file if build impossible

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>
This commit is contained in:
Bruce Richardson 2020-11-12 09:41:41 +00:00 committed by Thomas Monjalon
parent b334236abd
commit 3495a68f2a
14 changed files with 46 additions and 0 deletions

View File

@ -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']

View File

@ -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')

View File

@ -8,6 +8,9 @@
allow_experimental_apis = true
build = dpdk_conf.has('RTE_RAW_IOAT')
if not build
subdir_done()
endif
deps += ['raw_ioat']

View File

@ -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(

View File

@ -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'

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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

View File

@ -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(

View File

@ -8,7 +8,9 @@
if not is_linux
build = false
subdir_done()
endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(

View File

@ -8,7 +8,9 @@
if not is_linux
build = false
subdir_done()
endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(

View File

@ -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'

View File

@ -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(