[3/7] build: make bpf library optional

Message ID 20230622134840.3225975-4-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series expand list of optional libraries |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Bruce Richardson June 22, 2023, 1:48 p.m. UTC
  Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build | 10 +++++++---
 lib/meson.build      |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index bed6acfdaf..d8ad8b1d97 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -15,7 +15,6 @@  test_sources = files(
         'test_barrier.c',
         'test_bitops.c',
         'test_bitmap.c',
-        'test_bpf.c',
         'test_byteorder.c',
         'test_cksum.c',
         'test_cksum_perf.c',
@@ -152,8 +151,6 @@  fast_tests = [
         ['acl_autotest', true, true],
         ['atomic_autotest', false, true],
         ['bitmap_autotest', true, true],
-        ['bpf_autotest', true, true],
-        ['bpf_convert_autotest', true, true],
         ['bitops_autotest', true, true],
         ['byteorder_autotest', true, true],
         ['cksum_autotest', true, true],
@@ -343,6 +340,13 @@  if dpdk_conf.has('RTE_EVENT_SKELETON')
     test_deps += 'event_skeleton'
 endif
 
+if dpdk_conf.has('RTE_LIB_BPF')
+    test_sources += 'test_bpf.c'
+    fast_tests += [
+        ['bpf_autotest', true, true],
+        ['bpf_convert_autotest', true, true],
+    ]
+endif
 if dpdk_conf.has('RTE_LIB_DMADEV')
     test_sources += ['test_dmadev.c', 'test_dmadev_api.c']
     driver_test_names += 'dmadev_autotest'
diff --git a/lib/meson.build b/lib/meson.build
index e46b141657..105f167d45 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -70,6 +70,7 @@  libraries = [
 optional_libs = [
         'bbdev',
         'bitratestats',
+        'bpf',
         'cfgfile',
         'compressdev',
         'dmadev',