[libdazzle] build: make tests optional



commit 0f7dc7c8dbe1eba02f6190b0423bb8b6524c7a95
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jun 10 17:28:41 2017 -0700

    build: make tests optional

 meson_options.txt |    4 ++++
 tests/meson.build |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index 8bb330a..a1c543e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,3 +14,7 @@ option('with_vapi', type: 'boolean', value: true)
 option('package_subdir', type: 'string',
   description: 'Subdirectory to append to all installed files, for use as subproject'
 )
+
+option('enable-tests',
+       type: 'boolean', value: true,
+       description: 'Whether to compile unit tests')
diff --git a/tests/meson.build b/tests/meson.build
index a6c66cb..bcd5f5a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,3 +1,5 @@
+if get_option('enable-tests')
+
 test_env = [
   'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
   'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
@@ -256,3 +258,5 @@ test_ring = executable('test-ring', 'test-ring.c',
      link_args: test_link_args,
   dependencies: libdazzle_deps + [libdazzle_dep],
 )
+
+endif


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