diff options
author | David Robillard <d@drobilla.net> | 2022-12-10 11:04:10 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-11 13:09:54 -0500 |
commit | 07248d1c3ea7cb071aafddebf0ba98221baa08d0 (patch) | |
tree | 6fa76ec6f80cd00305363db33064a8ea9725d122 /test/headers/meson.build | |
parent | 95c1033b7c805da8c2bc69f6f43277008a5980b5 (diff) | |
download | sratom-07248d1c3ea7cb071aafddebf0ba98221baa08d0.tar.gz sratom-07248d1c3ea7cb071aafddebf0ba98221baa08d0.tar.bz2 sratom-07248d1c3ea7cb071aafddebf0ba98221baa08d0.zip |
Test header for warnings more strictly
Diffstat (limited to 'test/headers/meson.build')
-rw-r--r-- | test/headers/meson.build | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/headers/meson.build b/test/headers/meson.build new file mode 100644 index 0000000..aed2e43 --- /dev/null +++ b/test/headers/meson.build @@ -0,0 +1,43 @@ +# Copyright 2020-2022 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +header_c_suppressions = [] + +if get_option('strict') + if cc.get_id() == 'clang' + header_c_suppressions += [ + '-Wno-cast-align', # LV2 + '-Wno-cast-qual', # LV2 + '-Wno-declaration-after-statement', # LV2 + ] + elif cc.get_id() == 'gcc' + header_c_suppressions += [ + '-Wno-cast-align', # LV2 + '-Wno-cast-qual', # LV2 + '-Wno-padded', # Serd + '-Wno-sign-conversion', # LV2 + '-Wno-unused-const-variable', # Serd + ] + elif cc.get_id() == 'msvc' + header_c_suppressions += [ + '/wd4820', # padding added after construct + ] + endif +endif + +if cc.get_id() == 'clang' + header_c_suppressions += [ + '-Wno-nullability-extension', + ] +endif + +test( + 'headers', + executable( + 'test_headers', + files('test_headers.c'), + c_args: header_c_suppressions, + dependencies: [sratom_dep], + ), + suite: 'unit', +) |