-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
39 lines (32 loc) · 993 Bytes
/
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
project(
'μHAL',
['c','cpp'],
version: '0.0.1',
default_options: ['c_std=c17', 'cpp_std=c++20', 'warning_level=3',],
)
languages = ['c', 'cpp']
add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: languages)
if get_option('pcie_opt')
if host_machine.cpu_family() == 'x86_64'
add_project_arguments('-msse4.1', language: languages)
endif
endif
foreach lang : languages
compiler = meson.get_compiler(lang)
foreach arg : ['-Wstrict-aliasing=3', '-Wvla', '-Wsuggest-override']
if compiler.has_argument(arg)
add_project_arguments(arg, language: lang)
endif
endforeach
endforeach
thread_dep = dependency('threads')
argparse = dependency('argparse', fallback: 'argparse')
catch2 = dependency('catch2-with-main', fallback: 'catch2')
sdbfs = dependency('sdbfs', fallback: 'sdbfs')
ordered_map = dependency('ordered-map', fallback: 'ordered-map')
header_dir = 'uhal'
subdir('include')
subdir('util')
subdir('templates')
subdir('modules')
subdir('app')