spa: auto-generate the cpp compilation test

Replace the manually maintained header list with a Python script that finds
all header files and includes them in order. This adds another 25 or so
previously headers to the C++ compilation tests.
This commit is contained in:
Peter Hutterer 2021-06-04 13:35:47 +10:00 committed by Wim Taymans
parent fb75367975
commit db989d851d
3 changed files with 30 additions and 82 deletions

View file

@ -31,8 +31,13 @@ foreach a : test_apps
endforeach
if have_cpp
gen_cpp_test = find_program('gen-cpp-test.py')
src_test_cpp = custom_target('gen-cpp-test',
command: [gen_cpp_test, meson.source_root() / 'spa' / 'include' / 'spa'],
output: 'test-cpp.cpp',
capture: true)
# compilation test only
executable('spa-test-cpp', 'test-cpp.cpp',
executable('spa-test-cpp', src_test_cpp,
include_directories : [spa_inc ],
dependencies : [],
install : false)