-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathmeson.build
More file actions
64 lines (52 loc) · 1.42 KB
/
meson.build
File metadata and controls
64 lines (52 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project('linuxcnc-unit-test','c')
src_root = 'src'
tp_src_dir = join_paths(src_root, 'emc/tp')
inc_dir = include_directories([
'unit_tests',
'unit_tests/mock',
src_root,
join_paths(src_root, 'emc/kinematics'),
tp_src_dir,
'src/libnml/posemath',
'src/emc/nml_intf',
'src/emc/motion',
'src/rtapi',
'src/hal',
])
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : true)
add_global_arguments(['-DULAPI','-DUNIT_TEST'], language : 'c')
# Define static libraries for easier linking with unit tests
posemath_obj = static_library('posemath',
'src/libnml/posemath/_posemath.c',
include_directories : inc_dir,
dependencies : [m_dep]
)
emcpose_obj = static_library('emcpose',
join_paths(src_root, 'emc/nml_intf/emcpose.c'),
include_directories : inc_dir
)
utlib_tp_deps = static_library('tp_deps',
[
join_paths(tp_src_dir, 'joint_util.c'),
join_paths(tp_src_dir, 'blendmath.c'),
join_paths(tp_src_dir, 'spherical_arc.c'),
join_paths(tp_src_dir, 'tc.c'),
join_paths(tp_src_dir, 'tcq.c'),
],
include_directories : inc_dir,
link_with: [emcpose_obj, posemath_obj])
tp_test_files = [
'test_blendmath',
'test_joint_util',
'test_spherical_arc',
'test_posemath'
]
foreach n : tp_test_files
test(n, executable(n,
join_paths('unit_tests/tp', n+'.c'),
dependencies : [m_dep],
include_directories : inc_dir,
link_with : [ utlib_tp_deps]
))
endforeach