mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
meson: Deduplicate sources before clang-tidy
Let's make sure we don't define the same clang-tidy test multiple times by deduplicating sources beforehand. We end up with the same sources in a few cases because e.g. we reuse the same fuzz-main.c for each fuzz target.
This commit is contained in:
13
meson.build
13
meson.build
@@ -2948,7 +2948,18 @@ endif
|
||||
alias_target('gensources', generated_sources)
|
||||
|
||||
clang_tidy = find_program('clang-tidy', required : false)
|
||||
if meson.version().version_compare('>=1.4.0')
|
||||
if meson.version().version_compare('>=1.10.0')
|
||||
uniq = {}
|
||||
|
||||
foreach source : sources
|
||||
if uniq.has_key(source.full_path())
|
||||
continue
|
||||
endif
|
||||
uniq += {source.full_path(): source}
|
||||
endforeach
|
||||
|
||||
sources = uniq.values()
|
||||
|
||||
foreach source : sources
|
||||
if systemd_headers.contains(source)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user