diff options
author | David Robillard <d@drobilla.net> | 2025-01-20 13:08:08 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-20 13:08:08 -0500 |
commit | fd11071115664d7cd72556c91e28cccf22c57bf5 (patch) | |
tree | c84013b4899032b0530cba903f45d8fb3f2591c6 /test/headers/meson.build | |
parent | f4240a9b27e98c40138c6ec866132b237f311dff (diff) | |
download | suil-fd11071115664d7cd72556c91e28cccf22c57bf5.tar.gz suil-fd11071115664d7cd72556c91e28cccf22c57bf5.tar.bz2 suil-fd11071115664d7cd72556c91e28cccf22c57bf5.zip |
Use "system" include type for all dependencies and add header test
Things get confused when these flags differ across projects, so universally
use "system" for external dependencies and test for header warnings only in
the project that owns them.
Diffstat (limited to 'test/headers/meson.build')
-rw-r--r-- | test/headers/meson.build | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/headers/meson.build b/test/headers/meson.build new file mode 100644 index 0000000..191159c --- /dev/null +++ b/test/headers/meson.build @@ -0,0 +1,27 @@ +# Copyright 2020-2025 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +header_c_suppressions = [] + +if get_option('warning_level') == 'everything' + if cc.get_id() == 'clang' + if not meson.is_cross_build() + header_c_suppressions += ['-Wno-poison-system-directories'] + endif + 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: suil_dep, + ), + suite: 'unit', +) |