]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: don't build fuzzers if tests are disabled
authorMichael Olbrich <m.olbrich@pengutronix.de>
Sun, 11 Nov 2018 10:27:35 +0000 (11:27 +0100)
committerMichael Olbrich <m.olbrich@pengutronix.de>
Sun, 11 Nov 2018 10:28:41 +0000 (11:28 +0100)
Fuzzers are just special tests anyways and without this, building with
'-Dtests=false' fails with:

.../src/fuzz/fuzz-main.c:20: undefined reference to `test_setup_logging'

meson.build

index 76add431463363b569c009c2230351d0a290452b..78be291ae646e900ce60175f55db827e11eb204c 100644 (file)
@@ -2768,6 +2768,7 @@ endif
 
 fuzzer_exes = []
 
+if get_option('tests') != 'false'
 foreach tuple : fuzzers
         sources = tuple[0]
         link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
@@ -2792,6 +2793,7 @@ foreach tuple : fuzzers
                 c_args : defs,
                 install : false)
 endforeach
+endif
 
 run_target('fuzzers',
         depends : fuzzer_exes,