-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
35 lines (26 loc) · 1.05 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
project('check-suite', 'c',
version: run_command(find_program('bash'), './.version.sh', check: true).stdout().strip(),
license : 'MIT',
default_options: 'c_std=c17',
meson_version: '>=0.57.0',
)
pkg = import('pkgconfig')
add_project_arguments('-D_GNU_SOURCE', language: 'c')
cc = meson.get_compiler('c')
check = dependency('check', version: '>=0.11')
subdir('include')
subdir('src')
meson.override_dependency(meson.project_name(), libcheck_suite_dep)
test_buildtypes = ['debug', 'debugoptimized']
opt_tests = get_option('tests')
if not meson.is_subproject() and (opt_tests.enabled() or (opt_tests.auto() and get_option('buildtype') in test_buildtypes))
subdir('tests')
endif
cppcheck = find_program('cppcheck', required: false)
if cppcheck.found()
run_target('cppcheck', command : [cppcheck, '--project=' + join_paths(meson.build_root(), 'compile_commands.json')])
endif
flawfinder = find_program('flawfinder', required: false)
if flawfinder.found()
run_target('flawfinder', command : [flawfinder, '--error-level=5', meson.project_source_root()])
endif