diff options
author | David Robillard <d@drobilla.net> | 2021-09-10 22:36:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-09-10 22:44:50 -0400 |
commit | 103270d23cca7f4e3424f255448fcf69925b1948 (patch) | |
tree | fcacab61f7a3d16acb4d680d86b64cf2151a43e5 | |
parent | 9bfa266e8a9c015391a0dbcb85feae4a36409f19 (diff) | |
download | zix-103270d23cca7f4e3424f255448fcf69925b1948.tar.gz zix-103270d23cca7f4e3424f255448fcf69925b1948.tar.bz2 zix-103270d23cca7f4e3424f255448fcf69925b1948.zip |
Suppress nullability extension warnings regardless of strict mode
-rw-r--r-- | meson.build | 10 | ||||
-rw-r--r-- | meson_options.txt | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/meson.build b/meson.build index b6cbf02..68195bf 100644 --- a/meson.build +++ b/meson.build @@ -25,13 +25,21 @@ versioned_name = 'zix' + version_suffix pkg = import('pkgconfig') cc = meson.get_compiler('c') +# Suppress unavoidable present even in default build +c_warnings = [] +c_suppressions = [] +if cc.get_id() == 'clang' + c_warnings = [ + '-Wno-nullability-extension', + ] +endif + # Set ultra strict warnings for developers, if requested if get_option('strict') if cc.get_id() == 'clang' c_warnings = [ '-Weverything', '-Wno-bad-function-cast', - '-Wno-nullability-extension', '-Wno-padded', '-Wno-reserved-id-macro', ] diff --git a/meson_options.txt b/meson_options.txt index 78c438b..e41ba23 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,11 +1,11 @@ -option('benchmarks', type: 'feature', value: 'auto', +option('benchmarks', type: 'feature', value: 'auto', yield: true, description: 'Build benchmarks') -option('strict', type: 'boolean', value: false, +option('strict', type: 'boolean', value: false, yield: true, description: 'Enable ultra-strict warnings') option('test_malloc', type: 'boolean', value: true, description: 'Test allocation failure') -option('tests', type: 'boolean', value: true, +option('tests', type: 'boolean', value: true, yield: true, description: 'Build tests') |