[pygobject] Add Bool option for tests



commit aefb0fb9d1d2bd8dff3679d892ca37b2e28514f2
Author: Adam Duskett <Aduskett gmail com>
Date:   Fri Mar 15 16:09:17 2019 -0400

    Add Bool option for tests
    
    Currently, there is no way to prevent tests from building using meson.
    When cross-compiling, building the tests aren't necessary, and would require
    gobject-introspection also to be made with tests.

 meson.build       | 3 +++
 meson_options.txt | 1 +
 2 files changed, 4 insertions(+)
---
diff --git a/meson.build b/meson.build
index 71dfc4aa..278fa16f 100644
--- a/meson.build
+++ b/meson.build
@@ -174,4 +174,7 @@ configure_file(input : 'PKG-INFO.in',
 
 subdir('gi')
 subdir('pygtkcompat')
+with_tests = get_option('tests')
+if with_tests
 subdir('tests')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 31f3aa39..5dd4cbcd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,3 @@
 option('python', type : 'string', value : 'python3')
 option('pycairo', type : 'boolean', value : true, description : 'build with pycairo integration')
+option('tests', type : 'boolean', value : true, description : 'build unit tests')


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