meson: don't build fuzzers if tests are disabled

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'
This commit is contained in:
Michael Olbrich 2018-11-11 11:27:35 +01:00
parent a9353a5c5b
commit 5996740a09
1 changed files with 2 additions and 0 deletions

View 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,