diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2022-11-07 13:34:52 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-11-07 13:34:52 +0100 |
commit | 11e134b4aa0ce6729d8b27f45da9cacd063081fc (patch) | |
tree | 9f0319b0ca37e1e44b8ec67bc5d2b90cbb2f7f2d | |
parent | d3185243035dbc07d9d1f3e593d52b2f95e9a981 (diff) | |
download | sigc++-11e134b4aa0ce6729d8b27f45da9cacd063081fc.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.build | 6 | ||||
-rw-r--r-- | meson_options.txt | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 2ab1391..0dd9d46 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}. @@ -258,7 +259,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/reference') subdir('docs/manual') @@ -332,6 +335,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 843f0a0..5553085 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') |