forked from arxlang/arxcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
79 lines (68 loc) · 1.75 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
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')
deps = [
dependency('arrow'),
dependency('llvm', version : '>=14.0.0'),
dependency('CLI11'),
dependency('threads'),
dependency('glog'),
]
inc = include_directories('./src')
project_src_files = files(
PROJECT_PATH + '/src/codegen/ast-to-llvm-ir.cpp',
PROJECT_PATH + '/src/codegen/ast-to-object.cpp',
PROJECT_PATH + '/src/codegen/ast-to-stdout.cpp',
PROJECT_PATH + '/src/error.cpp',
PROJECT_PATH + '/src/io.cpp',
PROJECT_PATH + '/src/lexer.cpp',
PROJECT_PATH + '/src/parser.cpp',
PROJECT_PATH + '/src/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')
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)