summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-20 13:11:00 -0500
committerDavid Robillard <d@drobilla.net>2025-01-20 18:54:58 -0500
commit71e8ad73b5afe4671da8103396cebc1e4fe6e4a5 (patch)
tree1cbee9e054c49967f0e1fee9f9e63777d7991e5c /test
parent620eda74d39462c2fdd0744c630f7391de31400e (diff)
downloadsratom-71e8ad73b5afe4671da8103396cebc1e4fe6e4a5.tar.gz
sratom-71e8ad73b5afe4671da8103396cebc1e4fe6e4a5.tar.bz2
sratom-71e8ad73b5afe4671da8103396cebc1e4fe6e4a5.zip
Use "system" includes for dependencies and strengthen 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. With this, we can remove all the suppressions that actually come from other projects and so can't be resolved here anyway.
Diffstat (limited to 'test')
-rw-r--r--test/headers/.clang-tidy2
-rw-r--r--test/headers/meson.build32
2 files changed, 5 insertions, 29 deletions
diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy
index aa1b43c..6f35b76 100644
--- a/test/headers/.clang-tidy
+++ b/test/headers/.clang-tidy
@@ -9,5 +9,5 @@ CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
value: '0'
WarningsAsErrors: '*'
-HeaderFilterRegex: '.*/sratom/[^/]+.h'
+HeaderFilterRegex: '.*'
FormatStyle: file
diff --git a/test/headers/meson.build b/test/headers/meson.build
index 2e18a44..5320627 100644
--- a/test/headers/meson.build
+++ b/test/headers/meson.build
@@ -5,34 +5,10 @@ header_c_suppressions = []
if get_option('warning_level') == 'everything'
if cc.get_id() == 'clang'
- header_c_suppressions += [
- '-Wno-cast-align', # LV2
- '-Wno-cast-qual', # LV2
- '-Wno-declaration-after-statement', # LV2
- '-Wno-documentation-unknown-command', # LV2
- '-Wno-padded', # LV2, serd
- '-Wno-poison-system-directories',
- '-Wno-unsafe-buffer-usage', # 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',
- ]
+ if not meson.is_cross_build()
+ c_suppressions += ['-Wno-poison-system-directories']
+ endif
+ endif
endif
header_c_suppressions = cc.get_supported_arguments(header_c_suppressions)