| 1 |
project('sub', 'c', version : '1.0', meson_version: '>= 1.9.0') |
| 2 |
foobar = executable('foobar', 'foobar.c', native : true) |
| 3 |
meson.override_find_program('foobar', foobar) |
| 4 |
|
| 5 |
found_foobar = find_program('foobar') |
| 6 |
if found_foobar.version() != meson.project_version() |
| 7 |
error('Overriden Executable had incorrect version: got @0@, expected @1@'.format(found_foobar.version(), meson.project_version())) |
| 8 |
endif |
| 9 |
|
| 10 |
test('foobar executable', foobar, args : [ meson.current_build_dir() / 'test-output.c' ]) |
| 11 |
test('overriden foobar executable', found_foobar, args : [ meson.current_build_dir() / 'test-output.c' ]) |