'glcpp-parse.[ch]',
input : 'glcpp-parse.y',
output : ['glcpp-parse.c', 'glcpp-parse.h'],
- command : [prog_bison, '-o', '@OUTPUT0@', '-p', 'glcpp_parser_',
- '--defines=@OUTPUT1@', '@INPUT@'],
+ command : [
+ prog_bison, '-o', '@OUTPUT0@', '-p', 'glcpp_parser_',
+ '--defines=@OUTPUT1@', '@INPUT@',
+ ],
)
glcpp_lex = custom_target(
libglcpp = static_library(
'glcpp',
[glcpp_lex, glcpp_parse, files('glcpp.h', 'pp.c')],
- link_with : libmesa_util,
+ dependencies : idep_mesautil,
include_directories : [inc_common],
c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args],
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
build_by_default : false,
)
-# TODO: figure out how to make all of these tests work.
+if with_any_opengl and with_tests
+ modes = ['unix', 'windows', 'oldmac', 'bizarro']
+ if dep_valgrind.found()
+ modes += ['valgrind']
+ endif
+
+ foreach m : modes
+ test(
+ 'glcpp test (@0@)'.format(m),
+ prog_python,
+ args : [
+ join_paths(meson.current_source_dir(), 'tests/glcpp_test.py'),
+ glcpp, join_paths(meson.current_source_dir(), 'tests'),
+ '--@0@'.format(m),
+ ],
+ suite : ['compiler', 'glcpp'],
+ )
+ endforeach
+endif