-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathmeson.build
71 lines (64 loc) · 1.55 KB
/
meson.build
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
64
65
66
67
68
69
70
71
# libmemory test build definition
clangtidy_files += files(
'main.c',
'main_locking.c',
'support/memory.c',
'src/aligned_malloc.c',
'src/malloc_freelist.c',
'src/malloc_freelist_locking.c'
)
libmemory_freelist_tests = executable('libmemory_freelist_test',
sources: [
'main.c',
'support/memory.c',
'src/aligned_malloc.c',
'src/malloc_freelist.c'
],
c_args: [
'-Wno-vla',
'-Wno-unused-parameter',
'-O0',
'-DALIGNED_MALLOC_CHECK_LARGE_ALLOC',
],
dependencies: [
cmocka_native_dep,
libmemory_freelist_native_dep,
libc_native_dep,
],
native: true,
# Do not built by default if we are a subproject
build_by_default: (meson.is_subproject() == false),
)
libmemory_freelist_locking_tests = executable('libmemory_freelist_locking_tests',
sources: [
'main_locking.c',
'support/memory.c',
'src/malloc_freelist_locking.c'
],
c_args: [
'-Wno-vla',
'-Wno-unused-parameter',
'-O0',
'-DALIGNED_MALLOC_CHECK_LARGE_ALLOC',
],
dependencies: [
cmocka_native_dep,
libmemory_freelist_native_dep,
libc_native_dep,
],
native: true,
# Do not built by default if we are a subproject
build_by_default: (meson.is_subproject() == false),
)
#############################
# Register Tests with Meson #
#############################
test_output_dir = 'CMOCKA_XML_FILE=' + meson.project_build_root() + '/test/%g.xml'
if meson.is_subproject() == false
test('libmemory_freelist_tests',
libmemory_freelist_tests,
env: [ test_output_dir ])
test('libmemory_freelist_locking_tests',
libmemory_freelist_locking_tests,
env: [ test_output_dir ])
endif