[PATCH v15 30/60] app/test-pmd: check compiler supports flag when adding to set
Andre Muezerie
andremue at linux.microsoft.com
Tue Jan 14 02:22:42 CET 2025
This is done so that multiple compilers can be supported.
Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
---
app/test-pmd/meson.build | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index f1c36529b4..8de1528428 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -3,7 +3,15 @@
# override default name to drop the hyphen
name = 'testpmd'
-cflags += '-Wno-deprecated-declarations'
+
+extra_flags = ['-Wno-deprecated-declarations']
+
+foreach arg: extra_flags
+ if cc.has_argument(arg)
+ cflags += arg
+ endif
+endforeach
+
sources = files(
'5tswap.c',
'cmdline.c',
--
2.47.0.vfs.0.3
More information about the dev
mailing list