diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-12 16:52:08 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 12:07:34 +0200 |
commit | 3b2bdd625a176fd8b75a8bef8f6269322b73bca6 (patch) | |
tree | db95c9daa8551bc437bcd8f012315f0a17ed27cd /meson.build | |
parent | 15c5594bec63dbd5c71064439c9ecba46ebad705 (diff) | |
download | systemd-3b2bdd625a176fd8b75a8bef8f6269322b73bca6.tar.gz systemd-3b2bdd625a176fd8b75a8bef8f6269322b73bca6.tar.bz2 systemd-3b2bdd625a176fd8b75a8bef8f6269322b73bca6.zip |
meson: always allow compilation of tests binaries
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/meson.build b/meson.build index 694c5cfcdd..e8550ddea8 100644 --- a/meson.build +++ b/meson.build @@ -274,12 +274,10 @@ want_tests = get_option('tests') slow_tests = want_tests != 'false' and get_option('slow-tests') install_tests = get_option('install-tests') -if want_tests != 'false' - cxx = find_program('c++', required : false) - if cxx.found() - # Used only for tests - add_languages('cpp') - endif +cxx = find_program('c++', required : false) +if cxx.found() + # Used only for tests + add_languages('cpp') endif want_ossfuzz = get_option('oss-fuzz') @@ -2640,9 +2638,8 @@ foreach tuple : tests timeout = type.split('=')[1].to_int() type = '' endif - if want_tests == 'false' - message('Not compiling @0@ because tests is set to false'.format(name)) - elif condition == '' or conf.get(condition) == 1 + + if condition == '' or conf.get(condition) == 1 exe = executable( name, sources, @@ -2650,6 +2647,7 @@ foreach tuple : tests link_with : link_with, dependencies : dependencies, c_args : defs, + build_by_default : want_tests != 'false', install_rpath : rootlibexecdir, install : install_tests, install_dir : join_paths(testsdir, type)) @@ -2658,7 +2656,7 @@ foreach tuple : tests message('@0@ is a manual test'.format(name)) elif type == 'unsafe' and want_tests != 'unsafe' message('@0@ is an unsafe test'.format(name)) - else + elif want_tests != 'false' test(name, exe, env : test_env, timeout : timeout) |