libvirt/src/esx/meson.build
Ján Tomko 02552c2d1e tests: esxutilstest: depend on esx_gen_headers
Sometimes parallel compilation randomly fails on platforms
that do not have many drivers enabled, like macOS:

In file included from ../tests/esxutilstest.c:13:
../src/esx/esx_vi_types.h:62:10: fatal error: 'esx_vi_types.generated.typedef' file not found
 #include "esx_vi_types.generated.typedef"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

List esx_gen_headers as a source to stop meson from building
it before the headers are generated.

https://gitlab.com/libvirt/libvirt/-/jobs/726039284

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2020-09-23 13:23:18 +02:00

89 lines
1.8 KiB
Meson

esx_sources = [
'esx_driver.c',
'esx_interface_driver.c',
'esx_network_driver.c',
'esx_storage_driver.c',
'esx_storage_backend_vmfs.c',
'esx_storage_backend_iscsi.c',
'esx_stream.c',
'esx_util.c',
'esx_vi.c',
'esx_vi_methods.c',
'esx_vi_types.c',
]
esx_gen_headers = custom_target(
'virtesxgenheaders',
input: [
'esx_vi_generator.input',
],
output: [
'esx_vi.generated.h',
'esx_vi_methods.generated.h',
'esx_vi_types.generated.h',
'esx_vi_types.generated.typedef',
'esx_vi_types.generated.typeenum',
],
command: [
meson_python_prog, python3_prog.path(), esx_vi_generator_prog.path(),
meson.source_root() / 'src',
meson.build_root() / 'src',
'header',
],
)
esx_gen_sources = custom_target(
'virtesxgensources',
input: [
'esx_vi_generator.input',
],
output: [
'esx_vi.generated.c',
'esx_vi_methods.generated.macro',
'esx_vi_methods.generated.c',
'esx_vi_types.generated.c',
'esx_vi_types.generated.typefromstring',
'esx_vi_types.generated.typetostring',
],
command: [
meson_python_prog, python3_prog.path(), esx_vi_generator_prog.path(),
meson.source_root() / 'src',
meson.build_root() / 'src',
'source',
],
)
if conf.has('WITH_ESX')
esx_lib = static_library(
'virt_driver_esx',
[
esx_sources,
esx_gen_headers[1],
esx_gen_sources[1],
],
dependencies: [
curl_dep,
src_dep,
],
include_directories: [
conf_inc_dir,
vmx_inc_dir,
],
)
libvirt_libs += esx_lib
endif
if conf.has('WITH_ESX')
used_sym_files += 'libvirt_esx.syms'
else
sym_files += 'libvirt_esx.syms'
endif
esx_inc_dir = include_directories('.')
esx_dep = declare_dependency(
include_directories: esx_inc_dir,
sources: esx_gen_headers,
)