| 1 |
project('vala and asm', 'vala', 'c') |
| 2 |
|
| 3 |
cpu = host_machine.cpu_family() |
| 4 |
cc = meson.get_compiler('c') |
| 5 |
|
| 6 |
supported_cpus = ['arm', 'x86', 'x86_64'] |
| 7 |
|
| 8 |
if not supported_cpus.contains(cpu) |
| 9 |
error('MESON_SKIP_TEST unsupported cpu:' + cpu) |
| 10 |
endif |
| 11 |
|
| 12 |
if meson.get_compiler('c').get_id() == 'msvc' |
| 13 |
error('MESON_SKIP_TEST MSVC can\'t compile assembly') |
| 14 |
endif |
| 15 |
|
| 16 |
if cc.symbols_have_underscore_prefix() |
| 17 |
add_project_arguments('-DMESON_TEST__UNDERSCORE_SYMBOL', language: 'c') |
| 18 |
endif |
| 19 |
|
| 20 |
valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')] |
| 21 |
e = executable('vala-asm', ['prog.vala', 'retval-' + cpu + '.S'], |
| 22 |
dependencies: valadeps) |
| 23 |
test('test-vala-asm', e) |