From 94d6d6fb61a1cac5e296d46202fd1d0255454aa8 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 5 Nov 2022 15:04:36 +0100 Subject: [PATCH] add build_tests option Allow the user to disable build of test programs Signed-off-by: Fabrice Fontaine --- meson.build | 6 +++++- meson_options.txt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ee588f30..ceef5cca 100644 --- a/meson.build +++ b/meson.build @@ -83,6 +83,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}. @@ -261,7 +262,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') @@ -335,6 +338,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 138e302b..eea909a9 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') pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy