| 1 |
project('native subproject', 'c', meson_version : '>= 1.12.0') |
| 2 |
|
| 3 |
# Test running a subproject for both host and build |
| 4 |
subproject('both', native : true) |
| 5 |
subproject('both', native : false) |
| 6 |
|
| 7 |
maingen = executable('maingen', 'maingen.c', native : true) |
| 8 |
meson.override_find_program('maingen', maingen, native : true) |
| 9 |
gen = subproject('buildtool', native : true).get_variable('e') |
| 10 |
|
| 11 |
ct = custom_target( |
| 12 |
'generated', |
| 13 |
command : [gen], |
| 14 |
output : 'generated.c', |
| 15 |
capture : true, |
| 16 |
) |
| 17 |
|
| 18 |
e = executable('testprog', ct, install : true) |
| 19 |
|
| 20 |
test('main', e) |
| 21 |
|
| 22 |
if meson.is_cross_build() |
| 23 |
subproject('test installs', native : true) |
| 24 |
endif |
| 25 |
|
| 26 |
# Test a subproject configured from the main project, and then called as a nested subproject |
| 27 |
subproject('recursive-both', native : true) |
| 28 |
subproject('recursive-both', native : false) |
| 29 |
|
| 30 |
subproject('recursive-build-only', native : true) |
| 31 |
subproject('recursive-host-only', native : false) |