1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
tools = [
{
'name': 'metar',
},
{
'name': 'sun_moon',
'sources': [
'test_sun_moon.c',
'../weather-sun.c',
'../weather-moon.c',
],
},
{
'name': 'weather',
}
]
schemas_srcdir = meson.project_source_root() / 'schemas'
schemas_builddir = meson.project_build_root() / 'schemas'
tools_cargs = [
'-DTEST_LOCATIONS="@0@"'.format(locations_bin.full_path()),
'-DSCHEMASDIR="@0@"'.format(schemas_srcdir),
'-DSCHEMAS_BUILDDIR="@0@"'.format(schemas_builddir),
]
foreach tool: tools
tool_name = tool.get('name')
tool_sources = tool.get('sources', ['test_' + tool_name + '.c'])
executable('test_' + tool_name,
sources: tool_sources,
c_args: tools_cargs,
dependencies: libgweather_static_dep,
install: false,
)
endforeach
|