[jsonrpc-glib] build: add enable-tests option
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib] build: add enable-tests option
- Date: Mon, 5 Jun 2017 10:19:16 +0000 (UTC)
commit 4dac5cf02c66b8d8aac05af12cbcb4f44fd48345
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 5 03:18:06 2017 -0700
build: add enable-tests option
If you don't have gio-unix-2.0, this would allow you to avoid compiling
the tests for now.
meson_options.txt | 3 +++
tests/meson.build | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index f640e6b..840c457 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,3 +11,6 @@ option('enable-gtk-doc',
type: 'boolean', value: false,
description: 'Whether to generate the API reference for Jsonrpc-GLib')
+option('enable-tests',
+ type: 'boolean', value: true,
+ description: 'Whether to compile unit tests')
diff --git a/tests/meson.build b/tests/meson.build
index a5e2e6f..ce0be52 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()),
@@ -45,3 +47,5 @@ test_stress = executable('test-stress', 'test-stress.c',
link_args: test_link_args,
dependencies: test_deps,
)
+
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]