[libgweather/tests-option] build: Allow disabling the tests and tools
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/tests-option] build: Allow disabling the tests and tools
- Date: Sat, 16 Oct 2021 20:59:53 +0000 (UTC)
commit 094ed1c55b29e973d215f3b4b0d288e1474c5105
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Oct 16 21:59:02 2021 +0100
build: Allow disabling the tests and tools
Projects that depend on libgweather and build it as part of their
Flatpak manifest should have the option to skip building the tests.
libgweather/meson.build | 6 ++++--
meson_options.txt | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libgweather/meson.build b/libgweather/meson.build
index d0a0aff7..8262832f 100644
--- a/libgweather/meson.build
+++ b/libgweather/meson.build
@@ -241,5 +241,7 @@ pkgconfig.generate(
],
)
-subdir('tests')
-subdir('tools')
+if get_option('tests')
+ subdir('tests')
+ subdir('tools')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 0e354dab..bbf5a665 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,3 +8,5 @@ option('gtk_doc', type: 'boolean', value: true,
description: 'Whether to generate the API reference')
option('introspection', type: 'boolean', value: true,
description: 'Whether to generate introspection data')
+option('tests', type: 'boolean', value: true,
+ description: 'Whether to build the tests and tools')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]