summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2022-11-05 15:04:36 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-11-07 12:40:28 +0100
commitdc2f2f4e6daea26a8901cf86ebb0d4cd0b3b726e (patch)
tree0f1689dac3c5f6d2203d013bc4d3c0d8f8049f57
parent9f1748e5fe6264e1da11fa334f6b73a7039b66f5 (diff)
downloadsigc++-dc2f2f4e6daea26a8901cf86ebb0d4cd0b3b726e.tar.gz
add build_tests option
Allow the user to disable build of test programs Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt2
2 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 2fede19..70be03b 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,7 @@ build_documentation_opt = get_option('build-documentation')
build_documentation = build_documentation_opt == 'true' or \
(build_documentation_opt == 'if-maintainer-mode' and maintainer_mode)
build_examples = get_option('build-examples')
+build_tests = get_option('build-tests')
do_benchmark = get_option('benchmark')
# Installation directories are relative to {prefix}.
@@ -255,7 +256,9 @@ can_add_dist_script = not meson.is_subproject() or meson.version().version_compa
subdir('MSVC_NMake')
subdir('sigc++')
subdir('examples')
-subdir('tests')
+if build_tests
+ subdir('tests')
+endif
subdir('docs/docs/reference')
subdir('docs/docs/manual')
@@ -329,6 +332,7 @@ summary = [
' XML validation: @0@@1@'.format(validate, explain_val),
' Build PDF: @0@@1@'.format(build_pdf, explain_pdf),
' Build example programs: @0@'.format(build_examples),
+ ' Build test programs: @0@'.format(build_tests),
' Benchmark: @0@'.format(do_benchmark),
'Directories:',
' prefix: @0@'.format(install_prefix),
diff --git a/meson_options.txt b/meson_options.txt
index 138e302..eea909a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,5 +14,7 @@ option('build-pdf', type: 'boolean', value: false,
description: 'Build tutorial PDF file')
option('build-examples', type: 'boolean', value: true,
description: 'Build example programs')
+option('build-tests', type: 'boolean', value: true,
+ description: 'Build test programs')
option('benchmark', type: 'boolean', value: false,
description: 'Build and test benchmark program')