Debian Codegraph @

test cases/rust/14 external libm/meson.build

raw
1 project('rust linking to libm', 'c', 'rust')
2
3 cc = meson.get_compiler('c')
4 dep_m = cc.find_library('m', required : false, static : get_option('static'))
5 if not dep_m.found()
6 error('MESON_SKIP_TEST: Could not find a @0@ libm'.format(get_option('static') ? 'static' : 'shared'))
7 endif
8
9 librs_math = static_library(
10 'rs_math',
11 'rs_math.rs',
12 dependencies : [dep_m],
13 )
14
15 e = executable(
16 'prog', 'prog.rs',
17 link_with : [librs_math],
18 )
19
20 test('cdepstest', e)