| 1 |
project('rustprog', 'rust', default_options : ['b_ndebug=true']) |
| 2 |
|
| 3 |
e = executable('rust-program', 'prog.rs', |
| 4 |
install : true |
| 5 |
) |
| 6 |
test('rusttest', e) |
| 7 |
|
| 8 |
e = executable('rust-dynamic', 'prog.rs', |
| 9 |
override_options: {'rust_dynamic_std': true}, |
| 10 |
install : true |
| 11 |
) |
| 12 |
test('rusttest-dynamic', e) |
| 13 |
|
| 14 |
subdir('subdir') |
| 15 |
|
| 16 |
# this should fail due to debug_assert |
| 17 |
test( |
| 18 |
'debug_assert_on', |
| 19 |
executable( |
| 20 |
'rust-program2', |
| 21 |
'prog.rs', |
| 22 |
override_options : ['b_ndebug=false'], |
| 23 |
), |
| 24 |
should_fail : true, |
| 25 |
) |
| 26 |
|
| 27 |
rustc = meson.get_compiler('rust') |
| 28 |
assert(rustc.run('fn main(){}').returncode() == 0) |