| 1 |
project('test include path', 'c') |
| 2 |
|
| 3 |
if meson.get_compiler('c').get_id() not in ['gcc', 'clang'] |
| 4 |
error('MESON_SKIP_TEST: test needs #include_next <>') |
| 5 |
endif |
| 6 |
|
| 7 |
add_global_arguments('-iquote', meson.current_source_dir() / 'include', language: ['c']) |
| 8 |
|
| 9 |
e = executable('executable', 'test.c', native: true) |
| 10 |
test('executable', e) |
| 11 |
|
| 12 |
subproject('hostsub') |
| 13 |
|
| 14 |
# run the same test in a build-side subproject. Even if that subproject |
| 15 |
# uses "native: false", it has to use the build-side global arguments |
| 16 |
# because nothing else would make sense in a cross compilation scenario. |
| 17 |
subproject('buildsub', native: true) |