From eb16b364056e6d55bb1381ba8ce3510b4f1f389f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 4 Jun 2025 17:42:17 +0200 Subject: [PATCH] build: Make tests optional When used as a subproject, there is little point in adding tests to the parent project's test suite. Even if the tests caught an error, it wouldn't be in the position of fixing it. So add a build option that allows parent projects to turn off tests. --- meson.build | 4 +++- meson_options.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f298d15..305601f 100644 --- a/meson.build +++ b/meson.build @@ -42,4 +42,6 @@ else install_subdir('blueprintcompiler', install_dir: py.get_install_dir()) endif -subdir('tests') +if get_option('tests') + subdir('tests') +endif diff --git a/meson_options.txt b/meson_options.txt index c3c5661..5154d24 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('docs', type: 'boolean', value: false) +option('tests', type: 'boolean', value: true)