Skip to content

Commit c4ea6c1

Browse files
committed
meson: Define our own clang-tidy target
meson's target has a few issues: - Runs on all source files regardless if they're included in the build or not - Doesn't have any dependencies on generated sources which means we have to do a full build first before we can run clang-tidy - Doesn't allow us to pass any extra arguments To work around these, let's define our own clang-tidy target instead using llvm's run-clang-tidy script. Alongside the clang-tidy target, let's start keeping track of all generated sources which we make the clang-tidy target depend on. We also add a new target which will only generate source files which is useful for setting up the source tree for running code analysis against it.
1 parent 9f99339 commit c4ea6c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ if conf.get('ENABLE_UKIFY') == 1
3737
capture : true,
3838
build_by_default : want_tests != 'false')
3939
else
40-
test_hwids_section_c = ''
40+
test_hwids_section_c = []
4141
endif
4242

43+
generated_sources += test_hwids_section_c
44+
4345
executables += [
4446
efi_test_template + {
4547
'sources' : files('test-bcd.c'),

0 commit comments

Comments
 (0)