]> git.droids-corp.org - dpdk.git/commitdiff
examples: stop processing meson file if build impossible
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 12 Nov 2020 09:41:41 +0000 (09:41 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Nov 2020 18:33:36 +0000 (19:33 +0100)
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>
14 files changed:
examples/distributor/meson.build
examples/ethtool/meson.build
examples/ioat/meson.build
examples/ip_pipeline/meson.build
examples/kni/meson.build
examples/l2fwd-cat/meson.build
examples/ntb/meson.build
examples/performance-thread/l3fwd-thread/meson.build
examples/performance-thread/pthread_shim/meson.build
examples/pipeline/meson.build
examples/vdpa/meson.build
examples/vhost/meson.build
examples/vhost_blk/meson.build
examples/vhost_crypto/meson.build

index 5244cd4ffc31c03200e627a029e8b56c82b37b11..d8dbc235fb0b1b7461340bef7741b4e051c0085b 100644 (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']
index cc8edac3df79ca03697918be0bb36e2f3f45b575..4d08bc4c57ec1d78306fecef9f9e5291c5cc4dd2 100644 (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')
index 6afbaa6803e93565c6c971849b8b8a1efd185051..e348196ba3426cedc8f59bdaeb8476eb738f243c 100644 (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']
 
index 664223c97f8d23a7f2102fa7957e23018e95cc1c..945e28b58b99b4f7f4b9b2a78adc1cb27d5caf6f 100644 (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(
index 58639b13922361da5ab5234b5ff096805d76cb97..e119eebabb3be2ec83bf6d5ab6caea5bd0a755fb 100644 (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'
index 2bed18e74954fb4ce0c1bdb685c8c411abca9cfa..60169bcbda3bb4f62778b760217a89f6f45d0049 100644 (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
index b0201f68b18930eecd30d1859f7acedddb149c5b..02be9fc80dcb36da514beb4b05356398da10fae7 100644 (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(
index 99de24be7dec5b4611bede4f9b9a560f90a495d6..4858b201e4ba393d70f618f4c7845e600d0ef4c5 100644 (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
 
index 26ef78635a06a873853a173bd246f0cf53757a66..d499799307767842ca14ec2526ca5cd32b4bd9c8 100644 (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
 
index e47d483de1566f33f61df6a1c9584e85f3de759e..4f5925d7cfeb0e9f3f22cfb65761eeb0841f3f92 100644 (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(
index 73f129cd913986dc73f295d200f2f23d6413283b..26f6089c923f3c0b32db719906327324e466ff27 100644 (file)
@@ -8,7 +8,9 @@
 
 if not is_linux
        build = false
+       subdir_done()
 endif
+
 deps += 'vhost'
 allow_experimental_apis = true
 sources = files(
index 24f1f713133a1b03b5f14115310c623ffdb3fd3e..7e5b9d938ff479a3ba7476215d0aa42d143c9160 100644 (file)
@@ -8,7 +8,9 @@
 
 if not is_linux
        build = false
+       subdir_done()
 endif
+
 deps += 'vhost'
 allow_experimental_apis = true
 sources = files(
index 857367192cf903a01154eb060c727c49aa242580..354ba05848d06468ebd49163fa54dcc41b42536d 100644 (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'
index b2c125e2fa1e2131c3308669a89807d03c689fb0..403f210983183f989ce6c473ab202e5ca1dd2eac 100644 (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(