| 1 |
# Comment on the first line |
| 2 |
project('trivial test', |
| 3 |
# Comment inside a function call + array for language list |
| 4 |
['c'], default_options: ['buildtype=debug'], |
| 5 |
meson_version : '>=0.52.0') |
| 6 |
#this is a comment |
| 7 |
sources = 'trivial.c' |
| 8 |
|
| 9 |
cc = meson.get_compiler('c') |
| 10 |
if cc.get_id() == 'intel' |
| 11 |
# Error out if the -std=xxx option is incorrect |
| 12 |
add_project_arguments('-diag-error', '10159', language : 'c') |
| 13 |
elif cc.get_id() == 'intel-cl' |
| 14 |
add_project_arguments('/Qdiag-error:10159', language : 'c') |
| 15 |
endif |
| 16 |
|
| 17 |
exe = executable('trivialprog', sources : sources, |
| 18 |
link_args : '', |
| 19 |
dependencies: '') |
| 20 |
assert(exe.name() == 'trivialprog') |
| 21 |
test('runtest', exe) # This is a comment |
| 22 |
|
| 23 |
has_not_changed = false |
| 24 |
if is_disabler(exe) |
| 25 |
has_not_changed = true |
| 26 |
else |
| 27 |
has_not_changed = true |
| 28 |
endif |
| 29 |
assert(has_not_changed, 'Executable has changed.') |
| 30 |
|
| 31 |
assert(not is_disabler(exe), 'Executable is a disabler.') |