diff --git a/meson.build b/meson.build index 9c2dbeb..2dd4479 100644 --- a/meson.build +++ b/meson.build @@ -60,12 +60,14 @@ libvhost = static_library( c_args: libvhost_args + libvhost_optional_args + libvhost_defines, ) -libblkio_proj = subproject( - 'libblkio', - default_options: [ - 'subproject-docs=disabled', - 'subproject-examples=enabled', # used in libvhost tests - 'subproject-tests=disabled' - ] -) -subdir('tests') +if not get_option('tests').disabled() + libblkio_proj = subproject( + 'libblkio', + default_options: [ + 'subproject-docs=disabled', + 'subproject-examples=enabled', # used in libvhost tests + 'subproject-tests=disabled' + ] + ) + subdir('tests') +endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..a80fa94 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1 @@ +option('tests', type : 'feature', value : 'auto', description : 'Build tests and pull libblkio subproject')