Skip to content

Commit 11e134b

Browse files
ffontainekjellahl
authored andcommitted
add build_tests option
Allow the user to disable build of test programs Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
1 parent d318524 commit 11e134b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ build_documentation_opt = get_option('build-documentation')
7777
build_documentation = build_documentation_opt == 'true' or \
7878
(build_documentation_opt == 'if-maintainer-mode' and maintainer_mode)
7979
build_examples = get_option('build-examples')
80+
build_tests = get_option('build-tests')
8081
do_benchmark = get_option('benchmark')
8182

8283
# Installation directories are relative to {prefix}.
@@ -258,7 +259,9 @@ can_add_dist_script = not meson.is_subproject() or meson.version().version_compa
258259
subdir('MSVC_NMake')
259260
subdir('sigc++')
260261
subdir('examples')
261-
subdir('tests')
262+
if build_tests
263+
subdir('tests')
264+
endif
262265
subdir('docs/reference')
263266
subdir('docs/manual')
264267

@@ -332,6 +335,7 @@ summary = [
332335
' XML validation: @0@@1@'.format(validate, explain_val),
333336
' Build PDF: @0@@1@'.format(build_pdf, explain_pdf),
334337
' Build example programs: @0@'.format(build_examples),
338+
' Build test programs: @0@'.format(build_tests),
335339
' Benchmark: @0@'.format(do_benchmark),
336340
'Directories:',
337341
' prefix: @0@'.format(install_prefix),

meson_options.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ option('build-pdf', type: 'boolean', value: false,
1414
description: 'Build tutorial PDF file')
1515
option('build-examples', type: 'boolean', value: true,
1616
description: 'Build example programs')
17+
option('build-tests', type: 'boolean', value: true,
18+
description: 'Build test programs')
1719
option('benchmark', type: 'boolean', value: false,
1820
description: 'Build and test benchmark program')

0 commit comments

Comments
 (0)