[Mesa-dev] [PATCH mesa 5/6] meson: make it trivial to add other -Wno-foo CFLAGS
Eric Engestrom
eric.engestrom at intel.com
Fri Sep 21 13:50:40 UTC 2018
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
---
meson.build | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 7b7bf4d8e609c92bbd06..863962186caa6afe8ae4 100644
--- a/meson.build
+++ b/meson.build
@@ -790,9 +790,12 @@ foreach a : ['-Wall', '-Werror=implicit-function-declaration',
c_args += a
endif
endforeach
-if cc.has_argument('-Wmissing-field-initializers')
- c_args += '-Wno-missing-field-initializers'
-endif
+
+foreach a : ['missing-field-initializers']
+ if cc.has_argument('-W' + a)
+ c_args += '-Wno-' + a
+ endif
+endforeach
c_vis_args = []
if cc.has_argument('-fvisibility=hidden')
--
Cheers,
Eric
More information about the mesa-dev
mailing list