From 09dd598b1865b3f7a2b3cab1a316ca7e7446490b Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert Date: Sat, 7 Sep 2024 15:57:40 -0400 Subject: [PATCH] Only include tests in subproject if explicitly requested --- meson.build | 4 +++- meson_options.txt | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 76f2789..fffe880 100644 --- a/meson.build +++ b/meson.build @@ -77,4 +77,6 @@ if install endif # add the testsuite -subdir('test') +if get_option('testing').auto() ? not meson.is_subproject() : get_option('testing').enabled() + subdir('test') +endif diff --git a/meson_options.txt b/meson_options.txt index fa30967..15cdde0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -32,3 +32,10 @@ option( value: 'auto', description: 'Support quadruple precision', ) + +option( + 'testing', + type: 'feature', + value: 'auto', + description: 'Enable testing of test-drive library', +)