Debian Codegraph @

test cases/unit/66 static link/meson.build

raw
1 project('test static link', 'c')
2
3 cc = meson.get_compiler('c')
4
5 # Verify that installed libfunc2.a is usable
6 func2_dep = cc.find_library('func2')
7 test('test1', executable('test1', 'test1.c', dependencies : func2_dep))
8
9 # Verify that installed libfunc4.a is usable
10 func4_dep = cc.find_library('func4')
11 test('test2', executable('test2', 'test2.c', dependencies : func4_dep))
12
13 # Verify that installed pkg-config file is usable for both shared and static link
14 func6_static_dep = dependency('func6', static : true)
15 test('test3-static', executable('test3-static', 'test3.c',
16 dependencies : func6_static_dep))
17 func6_shared_dep = dependency('func6', static : false)
18 test('test3-shared', executable('test3-shared', 'test3.c',
19 dependencies : func6_shared_dep))
20
21 # Verify that installed libfunc9.a contains func8() and func8() but not func7()
22 func7_dep = cc.find_library('func7')
23 func9_linkwhole_dep = cc.find_library('func9_linkwhole')
24 test('test4-linkwhole', executable('test4-linkwhole', 'test4.c',
25 dependencies : [func7_dep, func9_linkwhole_dep]))
26 func9_linkwith_dep = cc.find_library('func9_linkwith')
27 test('test4-linkwith', executable('test4-linkwith', 'test4.c',
28 dependencies : [func7_dep, func9_linkwith_dep]))
29
30 # Verify that installed libfunc16.a is usable
31 libfunc16_dep = cc.find_library('func16')
32 test('test5', executable('test5', 'test5.c', dependencies: libfunc16_dep))