Skip test cases/frameworks/8 flex if flex or bison not found

pull/3060/head
Jon Turney 7 years ago
parent 68a5b8d9fc
commit b5edf78204
  1. 13
      test cases/frameworks/8 flex/meson.build

@ -4,8 +4,16 @@ project('flex and bison', 'c')
# may output headers that are necessary to build
# the sources of a different generator.
flex = find_program('flex')
bison = find_program('bison')
flex = find_program('flex', required: false)
bison = find_program('bison', required: false)
if not flex.found()
error('MESON_SKIP_TEST flex not found.')
endif
if not bison.found()
error('MESON_SKIP_TEST bison not found.')
endif
lgen = generator(flex,
output : '@PLAINNAME@.yy.c',
@ -23,4 +31,3 @@ e = executable('pgen', 'prog.c',
lfiles, pfiles)
test('parsertest', e)

Loading…
Cancel
Save