From: Michael Olbrich Date: Sun, 30 Sep 2018 14:08:14 +0000 (+0200) Subject: meson: only build src/shared/tests.c if tests are enabled X-Git-Tag: v240~618 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9fa9b71c6002e23730d1b620b7af07fb8b8a84d;p=thirdparty%2Fsystemd.git meson: only build src/shared/tests.c if tests are enabled It's only needed for tests and leaks build directories into libsystemd-shared. --- diff --git a/src/shared/meson.build b/src/shared/meson.build index 498b73c7504..ff9453f4803 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -89,8 +89,6 @@ shared_sources = files(''' switch-root.h sysctl-util.c sysctl-util.h - tests.c - tests.h tomoyo-util.c tomoyo-util.h udev-util.h @@ -107,6 +105,10 @@ shared_sources = files(''' wireguard-netlink.h '''.split()) +if get_option('tests') != 'false' + shared_sources += files('tests.c', 'tests.h') +endif + test_tables_h = files('test-tables.h') shared_sources += test_tables_h