From c530d1f9c1e092e1b12cc64b08683a006132b1c2 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Tue, 6 Mar 2018 19:41:24 -0500 Subject: [PATCH] meson: Add option to build without kyua for tests --- meson.build | 14 +++++++------- meson_options.txt | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index afb5cf9..4dc1e21 100644 --- a/meson.build +++ b/meson.build @@ -83,15 +83,15 @@ pkgconf_exe = executable('pkgconf', link_with : libpkgconf, install : true) - -kyua_exe = find_program('kyua') -atf_sh_exe = find_program('atf-sh') -test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile=' + join_paths(meson.build_root(), 'Kyuafile'), '--build-root=' + meson.build_root()]) +if get_option('tests') + kyua_exe = find_program('kyua') + atf_sh_exe = find_program('atf-sh') + test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile=' + join_paths(meson.build_root(), 'Kyuafile'), '--build-root=' + meson.build_root()]) -configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata) -subdir('tests') - + configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata) + subdir('tests') +endif install_man('man/pkgconf.1') install_man('man/pkg.m4.7') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..d1d0000 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,3 @@ +option('tests', type: 'boolean', value: true, + description: 'Build tests which depends upon the kyua framework' +) \ No newline at end of file -- 2.41.0