This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmeson.build
92 lines (79 loc) · 1.92 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
88
89
90
91
92
project('arx', 'cpp', 'c',
license : 'Apache-2.0',
version : '1.6.0', # semantic-release
default_options : [
'warning_level=everything',
'cpp_std=c++20',
]
)
add_global_arguments(
'-Wpedantic',
# '-Wno-c++98-compat-pedantic',
'-Wno-padded',
'-Wno-missing-prototypes',
'-Wshadow',
'-Wnon-virtual-dtor',
'-Wcast-align',
'-Wunused',
'-Woverloaded-virtual',
'-Wconversion',
'-Wsign-conversion',
'-Wdouble-promotion',
'-Wformat=2',
'-Wimplicit-fallthrough',
'-Wsuggest-override',
'-Wnull-dereference',
'-Wold-style-cast',
language : 'cpp'
)
PROJECT_PATH = meson.source_root()
cxx = meson.get_compiler('cpp')
llvm_modules = [
'core',
'executionengine',
'object',
'orcjit',
'support',
'native',
]
deps = [
dependency('arrow'),
dependency('arrow-glib'),
dependency('llvm', version : '>=15.0.0', modules : llvm_modules),
dependency('CLI11'),
dependency('threads'),
dependency('glog'),
]
inc = include_directories('./src')
SRC_PATH = PROJECT_PATH + '/src'
project_src_files = files(
SRC_PATH + '/codegen/arx-llvm.cpp',
SRC_PATH + '/codegen/ast-to-llvm-ir.cpp',
SRC_PATH + '/codegen/ast-to-object.cpp',
SRC_PATH + '/codegen/ast-to-stdout.cpp',
SRC_PATH + '/error.cpp',
SRC_PATH + '/io.cpp',
SRC_PATH + '/lexer.cpp',
SRC_PATH + '/parser.cpp',
SRC_PATH + '/utils.cpp',
)
gtest_dep = dependency('gtest', main : true, required: get_option('dev'))
gmock_dep = dependency('gmock', required: get_option('dev'))
if get_option('dev').enabled()
deps += [gtest_dep, gmock_dep]
subdir('tests/unittests')
endif
clangtidy = find_program('clang-tidy', required: get_option('dev'))
if clangtidy.found()
run_target(
'clang-tidy',
command: [
PROJECT_PATH + '/scripts/run-clang-tidy.sh',
])
endif
arx_exe = executable(
'arx',
project_src_files + files(PROJECT_PATH + '/src/main.cpp'),
dependencies : deps,
include_directories : inc,
install : true)