-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
46 lines (35 loc) · 1 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
# FIXME
project('ubbrl', 'c',
default_options: [
'warning_level=3',
'debug=true',
'b_sanitize=address',
'c_std=c99',
])
add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c')
inc = ['include', 'src', 'subprojects/c_omponents/include']
c_omponents = subproject('c_omponents')
c_omponents_dep = c_omponents.get_variable('c_omponents_dep')
inc_dirs = include_directories(inc)
src = [
'src/charstream.c',
'src/ubbrl.c',
'src/wordvec.c',
'src/history.c',
]
main = [ 'src/main.c' ]
ubbrl_so = library('ubbrl', src, include_directories: inc, link_with: c_omponents_dep)
executable('ubbrl', main, include_directories: inc, link_with: ubbrl_so)
unit_tests_src = [
'tests/test-ubbrl.c',
'tests/charstream.c',
'tests/wordvec.c',
]
criterion = dependency('criterion')
unit_tests = executable('ubbrl_unit_tests',
src,
unit_tests_src,
link_with: [ubbrl_so, c_omponents_dep],
dependencies: [criterion],
include_directories: inc)
test('libUBBRL Unit Tests', unit_tests)