forked from nix-community/nixd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
87 lines (76 loc) · 2.15 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
libnixf_deps = [ boost, libnixbc, nlohmann_json ]
libnixf_inc = include_directories('include')
libnixf = library(
'nixf',
'src/Basic/Nodes.cpp',
'src/Basic/JSONDiagnostic.cpp',
'src/Basic/Diagnostic.cpp',
'src/Bytecode/Write.cpp',
'src/Parse/Lexer.cpp',
'src/Parse/ParseAttrs.cpp',
'src/Parse/ParseExpr.cpp',
'src/Parse/ParseLambda.cpp',
'src/Parse/ParseOp.cpp',
'src/Parse/ParseSimple.cpp',
'src/Parse/ParseStrings.cpp',
'src/Parse/ParseSupport.cpp',
'src/Sema/ParentMap.cpp',
'src/Sema/SemaActions.cpp',
'src/Sema/VariableLookup.cpp',
include_directories: libnixf_inc,
dependencies: libnixf_deps,
install: true,
cpp_args: [ '-Werror=implicit-fallthrough' ]
)
pkgconfig.generate(
name: 'libnixf',
version: 'nightly',
description: 'libnixf',
libraries: libnixf
)
nixf = declare_dependency(
include_directories: libnixf_inc,
link_with: libnixf,
dependencies: libnixf_deps
)
test('unit/libnixf/Basic',
executable('unit-libnixf-basic',
'test/Basic/Diagnostic.cpp',
'test/Basic/Nodes.cpp',
dependencies: [ nixf, gtest_main ],
)
)
test('unit/libnixf/Bytecode',
executable('unit-libnixf-bytecode',
'test/Bytecode/Write.cpp',
dependencies: [ nixf, gtest_main ],
)
)
test('unit/libnixf/Parse',
executable('unit-libnixf-parse',
'test/Parse/Lexer.cpp',
'test/Parse/ParseAttrs.cpp',
'test/Parse/ParseExpr.cpp',
'test/Parse/ParseLambda.cpp',
'test/Parse/ParseOp.cpp',
'test/Parse/ParseSimple.cpp',
dependencies: [ nixf, gtest_main ],
include_directories: [ 'src/Parse' ] # Private headers
)
)
test('unit/libnixf/Sema',
executable('unit-libnixf-sema',
'test/Sema/SemaActions.cpp',
'test/Sema/VariableLookup.cpp',
'test/Sema/ParentMap.cpp',
dependencies: [ nixf, gtest_main ],
include_directories: [ 'src/Sema' ] # Private headers
)
)
subdir('tools')
nixf_tidy = executable('nixf-tidy',
'tools/nixf-tidy.cpp',
dependencies: [ nixf ],
install: true
)
install_subdir('include/nixf', install_dir: 'include')