[json-glib: 1/2] meson: add tests option



commit 8e835f8ed2299ad68032432eaf6491b2da8d532b
Author: Stéphane Cerveau <scerveau collabora com>
Date:   Thu Jan 9 10:20:13 2020 +0100

    meson: add tests option
    
    Give an option to meson to disable `tests` build

 json-glib/meson.build | 4 +++-
 meson_options.txt     | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/json-glib/meson.build b/json-glib/meson.build
index 035e954..e77f818 100644
--- a/json-glib/meson.build
+++ b/json-glib/meson.build
@@ -140,4 +140,6 @@ foreach t: tools
              install: true)
 endforeach
 
-subdir('tests')
+if get_option('tests')
+  subdir('tests')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index a6b2a51..068a03f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,6 @@ option('gtk_doc',
 option('man',
        type: 'boolean', value: false,
        description: 'Build the man pages (requires xsltproc)')
+option('tests',
+       type: 'boolean', value: true,
+       description: 'Build the tests')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]