meson: Run clang-tidy on libsystemd headers as well

This commit is contained in:
Daan De Meyer
2025-05-22 11:06:54 +02:00
parent 5ea01af240
commit 54b59d914e
2 changed files with 5 additions and 2 deletions

View File

@@ -2841,14 +2841,14 @@ alias_target('gensources', generated_sources)
clang_tidy = find_program('clang-tidy', required : false)
if meson.version().version_compare('>=1.4.0')
foreach source : sources
if fs.name(source).endswith('.h')
if not source.full_path().endswith('.c') and not source.full_path().endswith('.h')
continue
endif
inputs = [source]
header = source.full_path().replace('.c', '.h')
if fs.exists(header)
if fs.exists(header) and header != source.full_path()
inputs += header
endif

View File

@@ -52,6 +52,9 @@ _not_installed_headers = [
'sd-resolve.h',
]
sources += systemd_headers
sources += files(_not_installed_headers)
install_headers(
systemd_headers,
'_sd-common.h',