aboutsummaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-14 07:20:17 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-17 10:45:50 -0400
commit97d6efd0a3f3a08942de6c2aee5d2983c54ca84c (patch)
treecad0fbde9dc17814866eab33232841a5f9a85366 /tests/meson.build
parent3bf4583580ab705de1beff6222e934239c3a0356 (diff)
tests: add missing generated sources to testqapi
Ninja notices them due to a different order in visiting the graph. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/meson.build b/tests/meson.build
index bf47a38c74..afeb6be689 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -56,8 +56,18 @@ test_qapi_files = custom_target('Test QAPI files',
# perhaps change qapi_gen to replace / with _, like Meson itself does?
subdir('include')
-libtestqapi = static_library('testqapi', sources: [test_qapi_files, genh, test_qapi_outputs_extra])
-testqapi = declare_dependency(link_with: libtestqapi)
+test_qapi_sources = []
+test_qapi_headers = []
+i = 0
+foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list()
+ if o.full_path().endswith('.h')
+ test_qapi_headers += o
+ endif
+ test_qapi_sources += o
+endforeach
+
+libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources])
+testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers])
testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')