From 7cd07d7666daaa10bfc75516f801a032e8752752 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Mon, 3 Aug 2020 20:52:10 -0700 Subject: [PATCH] Make tests optional (#388) --- meson.build | 6 +++++- meson_options.txt | 13 ++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index f77686ed3..c9e3ce8c5 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,7 @@ project('com.github.akiraux.akira', 'vala', 'c') akira_prefix = get_option('prefix') akira_datadir = join_paths(akira_prefix, get_option('datadir')) akira_pkgdatadir = join_paths(akira_datadir, meson.project_name()) +install_tests = get_option('install-tests') vala_version = meson.get_compiler('vala').version() if vala_version.version_compare('<=0.43.90') @@ -67,6 +68,9 @@ add_global_arguments(['-DG_LOG_DOMAIN="Akira"'], language:'c') subdir('src') subdir('data') subdir('po') -subdir('tests') + +if install_tests + subdir('tests') +endif meson.add_install_script('build-aux/meson/post_install.py') diff --git a/meson_options.txt b/meson_options.txt index e48ea9247..b475d4c26 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,9 +1,4 @@ -option( - 'profile', - type: 'combo', - choices: [ - 'default', - 'development' - ], - value: 'default' -) +option('profile', type: 'combo', choices: ['default', 'development'], value: 'default') + +option('install-tests', type : 'boolean', value : 'false', + description : 'install test executables')