summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--meson.build3
-rw-r--r--test/headers/.clang-tidy2
-rw-r--r--test/headers/meson.build32
3 files changed, 8 insertions, 29 deletions
diff --git a/meson.build b/meson.build
index d66a893..43b6c1d 100644
--- a/meson.build
+++ b/meson.build
@@ -122,18 +122,21 @@ m_dep = cc.find_library('m', required: false)
serd_dep = dependency(
'serd-0',
fallback: 'serd',
+ include_type: 'system',
version: '>= 0.30.10',
)
sord_dep = dependency(
'sord-0',
fallback: 'sord',
+ include_type: 'system',
version: '>= 0.16.16',
)
lv2_dep = dependency(
'lv2',
fallback: 'lv2',
+ include_type: 'system',
version: '>= 1.18.4',
)
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)