forked from jwiegley/gdtoa
-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
85 lines (72 loc) · 2.55 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
project('gdtoa',
['c', 'cpp'],
default_options : [
'warning_level=3',
'werror=false',
# This project defaults to a release build
'debug=false',
'optimization=2',
# `build.*` options affect `native: true targets`
# plain options affect `native: false` targets.
'c_std=c11', 'build.c_std=c11',
'cpp_std=c++17', 'build.cpp_std=c++17',
],
meson_version: '>=0.58.0',
version: '1.2'
)
################################
# Project Options and Settings #
################################
# Pick up our common compiler variables + desired_*_flags variables
subdir('meson/compiler')
subdir('meson/compiler/c')
subdir('meson/compiler/cpp')
if get_option('debug')
add_project_arguments('-DDEBUG',
language: ['c', 'cpp'])
add_project_arguments('-DDEBUG',
language: ['c', 'cpp'], native: true)
endif
compile_settings_list = [
{'lang': 'c', 'compiler': host_c_compiler, 'flags': desired_c_compile_flags, 'isnative': false},
{'lang': 'c', 'compiler': native_c_compiler, 'flags': desired_native_c_compile_flags, 'isnative': true},
{'lang': 'cpp', 'compiler': host_cpp_compiler, 'flags': desired_cpp_compile_flags, 'isnative': false},
{'lang': 'cpp', 'compiler': native_cpp_compiler, 'flags': desired_native_cpp_compile_flags, 'isnative': true},
]
link_settings_list = [
{'lang': 'c', 'compiler': host_c_compiler, 'flags': [], 'isnative': false},
{'lang': 'c', 'compiler': native_c_compiler, 'flags': [], 'isnative': true},
{'lang': 'cpp', 'compiler': host_cpp_compiler, 'flags': [], 'isnative': false},
{'lang': 'cpp', 'compiler': native_cpp_compiler, 'flags': [], 'isnative': true},
]
# Process the compilation flags
subdir('meson/compiler/check-and-apply-flags')
#################
# Build Modules #
#################
# Include reusable build modules here via subdir() calls
subdir('meson/linker/linker-map')
subdir('meson/objcopy')
#######################
# Process Source Tree #
#######################
# Add files to this variable if you want them analyzed by clang-tidy
clangtidy_files = []
# Add dependencies to this array for testing with Catch2
catch2_tests_dep = []
subdir('src')
subdir('test')
###################
# Tooling Modules #
###################
# We only need to run these tools if we are the primary project.
# This reduces config time and target clutting when in subproject mode.
if meson.is_subproject() == false
#subdir('meson/analysis/clang-tidy')
#subdir('meson/analysis/complexity')
#subdir('meson/analysis/cppcheck')
#subdir('meson/analysis/sloccount')
#subdir('meson/analysis/vale')
subdir('meson/format')
#subdir('meson/docs/doxygen')
endif