-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
75 lines (69 loc) · 1.51 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
# SPDX-License-Identifier: BSD-3-Clause
project(
'contort',
'cpp',
default_options: [
'cpp_std=c++17',
'warning_level=3',
'buildtype=release',
'strip=true',
'b_ndebug=if-release',
'b_lto=true'
],
version: '0.0.1',
license: 'BSD-3-Clause',
meson_version: '>= 0.53',
subproject_dir: 'deps'
)
cxx = meson.get_compiler('cpp')
extendedWarnings = [
'-Wdouble-promotion',
'-Wformat=2',
'-Wformat-overflow=2',
'-Wformat-signedness',
'-Wformat-truncation',
'-Wnull-dereference',
'-Wmissing-attributes',
'-Wmissing-braces',
'-Wsequence-point',
'-Wreturn-type',
'-Wunused',
'-Wunused-local-typedefs',
'-Wunused-const-variable=2',
'-Wmaybe-uninitialized',
'-Wunknown-pragmas',
'-Wstrict-aliasing',
'-Wstrict-overflow=3',
'-Wstring-compare',
'-Wstringop-overflow',
'-Warith-conversion',
'-Wvla-parameter',
'-Wduplicated-branches',
# '-Wshadow=local',
'-Wunsafe-loop-optimizations',
'-Wbad-function-cast',
'-Wcast-qual',
'-Wcast-align=strict',
'-Wcast-function-type',
'-Wconversion',
'-Wdangling-else',
'-Wsign-conversion',
'-Wfloat-conversion',
'-Wpacked',
# '-Wpadded',
'-Wredundant-decls',
'-Winline',
'-Wvla',
'-Wstack-protector',
'-Wunsuffixed-float-constant',
'-Wimplicit-fallthrough'
]
add_project_arguments(cxx.get_supported_arguments(extendedWarnings), language: 'cpp')
subdir('include')
subdir('src')
subdir('test')
runClangTidy = find_program('runClangTidy.py')
run_target(
'clang-tidy',
command: [runClangTidy, '-s', meson.current_source_dir(), '-p', meson.current_build_dir()]
)