~lattis/muon

muon/meson.build -rw-r--r-- 1.3 KiB
f364b3baStone Tickle remove should_fail from passing tests 22 hours ago
                                                                                
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
project(
	'muon',
	'c',
	version: '0.0.1',
	license: 'GPL3',
	meson_version: '>=0.53.0',
	default_options: [
		'c_std=c99',
		'warning_level=3',
		'buildtype=debugoptimized',
		'default_library=static',
	],
)

# version information

git = find_program('git', required: false)
if git.found()
	git_rev_parse = run_command(git, 'rev-parse', '--short', '@')
	git_sha = git_rev_parse.stdout().strip()
else
	git_sha = 'unknown'
endif

version_info = configuration_data()
version_info.set('version', meson.project_version())
version_info.set('vcs_tag', git_sha)

# compiler setup

cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments([
	'-Wno-missing-braces',
	'-Wendif-labels',
	'-Wimplicit-fallthrough=2',
	'-Winit-self',
	'-Wlogical-op',
	'-Wmissing-include-dirs',
	'-Wno-missing-braces',
	'-Wno-missing-field-initializers',
	'-Wno-unused-parameter',
	'-Wold-style-definition',
	'-Woverflow',
	'-Wpointer-arith',
	'-Wstrict-aliasing=2',
	'-Wstrict-prototypes',
	'-Wundef',
	'-fstrict-aliasing',
	'-DMUON_BOOTSTRAPPED',
]), language: 'c')

deps = []
c_args = []

include_dir = include_directories('include')

subdir('tools')
subdir('src')

muon = executable(
	'muon',
	src,
	include_directories: include_dir,
	dependencies: deps,
	c_args: c_args,
	install: true,
)

subdir('tests')