aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build23
1 files changed, 13 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index cefc0ef2..4f27f76e 100644
--- a/meson.build
+++ b/meson.build
@@ -24,18 +24,19 @@ if add_languages('cpp', required: get_option('bindings_cpp'))
endif
# Set ultra strict warnings for developers, if requested
+c_warnings = []
+c_suppressions = []
if get_option('strict')
subdir('meson')
c_warnings = all_c_warnings
+
if cc.get_id() == 'clang'
- c_warnings += [
- '-Wno-bad-function-cast',
- '-Wno-cast-align',
- '-Wno-covered-switch-default',
- '-Wno-disabled-macro-expansion',
- '-Wno-double-promotion',
- '-Wno-float-equal',
+ c_suppressions += [
+ # '-Wno-cast-align',
+ # '-Wno-covered-switch-default',
+ # '-Wno-disabled-macro-expansion',
+ # '-Wno-double-promotion',
'-Wno-format-nonliteral',
'-Wno-implicit-fallthrough',
'-Wno-nullability-extension',
@@ -44,19 +45,20 @@ if get_option('strict')
'-Wno-reserved-id-macro',
]
elif cc.get_id() == 'gcc'
- c_warnings += [
+ c_suppressions += [
'-Wno-bad-function-cast',
'-Wno-cast-align',
'-Wno-format-nonliteral',
'-Wno-inline',
'-Wno-padded',
'-Wno-strict-overflow',
+ '-Wno-suggest-attribute=pure',
'-Wno-switch-default',
'-Wno-unsuffixed-float-constants',
'-Wno-unused-const-variable',
]
elif cc.get_id() == 'msvc'
- c_warnings += [
+ c_suppressions += [
'/wd4061', # enumerator in switch is not explicitly handled
'/wd4200', # nonstandard: zero-sized array in struct/union
'/wd4514', # unreferenced inline function has been removed
@@ -69,9 +71,10 @@ if get_option('strict')
]
endif
- c_warnings = cc.get_supported_arguments(c_warnings)
endif
+c_warnings += cc.get_supported_arguments(c_suppressions)
+
# Add special arguments for MSVC
if cc.get_id() == 'msvc'
msvc_args = [