summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 0bbd24b2..c6e6a934 100644
--- a/meson.build
+++ b/meson.build
@@ -60,6 +60,15 @@ if cc.get_id() == 'clang'
endif
endif
+# We use C99 designated initializers for arrays as C++ has no equivalent
+# feature. Both gcc and clang support this extension, but recent
+# versions of clang generate a warning that needs to be disabled.
+if cc.has_argument('-Wno-c99-designator')
+ common_arguments += [
+ '-Wno-c99-designator',
+ ]
+endif
+
c_arguments += common_arguments
cpp_arguments += common_arguments