-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
48 lines (36 loc) · 1.38 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
project('clockperf', 'c',
default_options: [
'buildtype=release',
'c_std=c99',
]
)
compiler = meson.get_compiler('c')
gen_build_h = custom_target('build.h',
input : [],
output : ['build.h'],
command : [meson.current_source_dir() + '/tools/build.pl', '@OUTPUT@'])
gen_license_h = custom_target('license.h',
input : ['COPYING'],
output : ['license.h'],
command : [meson.current_source_dir() + '/tools/license.pl', '@INPUT@', '@OUTPUT@'])
src = ['affinity.c', 'clock.c', 'drift.c', 'main.c', 'util.c', 'version.c']
system_deps = []
incdir_paths = ['.']
if compiler.get_id() == 'msvc'
src += ['getopt/getopt_long.c']
incdir_paths += ['getopt']
system_deps += [compiler.find_library('winmm')]
else
system_deps += [compiler.find_library('m')]
endif
incdirs = include_directories(incdir_paths)
threads = dependency('threads')
openmp = dependency('openmp', required: false)
add_project_arguments(compiler.first_supported_argument('-Wno-deprecated-declarations'), language: 'c')
executable('clockperf',
src,
gen_build_h,
gen_license_h,
include_directories : incdirs,
dependencies : system_deps + [threads, openmp])
# vim: set ts=4 sts=4 sw=4 et: