diff mbox series

[liburing,9/9] meson: update available examples to liburing 2.3

Message ID 20220727152723.3320169-10-florian.fischer@muhq.space (mailing list archive)
State New
Headers show
Series [liburing,1/9] add Meson build system | expand

Commit Message

Florian Fischer July 27, 2022, 3:27 p.m. UTC
Use an array of sources instead of declaring each example individually.

Add examples introduced by Pavel and Dylan in 82001392, c1d15e78 and 61d472b.

Signed-off-by: Florian Fischer <florian.fischer@muhq.space>
---
 examples/meson.build | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/examples/meson.build b/examples/meson.build
index becfc02..e7f5daf 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -1,17 +1,19 @@ 
-executable('io_uring-cp',
-           'io_uring-cp.c',
-           dependencies: uring)
-
-executable('io_uring-test',
-           'io_uring-test.c',
-           dependencies: uring)
-
-executable('link-cp',
-           'link-cp.c',
-           dependencies: uring)
+example_sources = [
+  'io_uring-cp.c',
+  'io_uring-test.c',
+  'io_uring-udp.c',
+  'link-cp.c',
+  'poll-bench.c',
+  'send-zerocopy.c',
+]
 
 if has_ucontext
-    executable('ucontext-cp',
-               'ucontext-cp.c',
-               dependencies: uring)
+  example_sources += ['ucontext-cp.c']
 endif
+
+foreach source: example_sources
+    name = source.split('.')[0]
+    executable(name,
+               source,
+               dependencies: uring)
+endforeach