diff options
-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') |