Skip to content

Commit dc2f2f4

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 9f1748e commit dc2f2f4

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}.
@@ -255,7 +256,9 @@ can_add_dist_script = not meson.is_subproject() or meson.version().version_compa
255256
subdir('MSVC_NMake')
256257
subdir('sigc++')
257258
subdir('examples')
258-
subdir('tests')
259+
if build_tests
260+
subdir('tests')
261+
endif
259262
subdir('docs/docs/reference')
260263
subdir('docs/docs/manual')
261264

@@ -329,6 +332,7 @@ summary = [
329332
' XML validation: @0@@1@'.format(validate, explain_val),
330333
' Build PDF: @0@@1@'.format(build_pdf, explain_pdf),
331334
' Build example programs: @0@'.format(build_examples),
335+
' Build test programs: @0@'.format(build_tests),
332336
' Benchmark: @0@'.format(do_benchmark),
333337
'Directories:',
334338
' 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)