forked from max0x7ba/atomic_queue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
42 lines (35 loc) · 1.21 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
# Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.
# (rm -rf build; meson build; cd build; time ninja -v)
project(
'atomic_queue', 'cpp',
license : 'MIT License',
default_options : ['cpp_std=gnu++14', 'buildtype=release', 'b_ndebug=if-release']
)
cxx = meson.get_compiler('cpp')
dl = cxx.find_library('dl', required : true)
threads = dependency('threads')
unit_test_framework = dependency('boost', modules : ['unit_test_framework'])
if get_option('benchmarks')
tbb = cxx.find_library('tbb', required : true)
xenium = declare_dependency(include_directories : '../xenium')
moodycamel = declare_dependency(include_directories : '../')
endif
atomic_queue = declare_dependency(include_directories : ['include'], dependencies : threads)
tests_exe = executable(
'tests',
'src/tests.cc',
dependencies : [atomic_queue, unit_test_framework]
)
test('tests', tests_exe)
example_exe = executable(
'example',
'src/example.cc',
dependencies : [atomic_queue]
)
if get_option('benchmarks')
benchmarks_exe = executable(
'benchmarks',
['src/benchmarks.cc', 'src/cpu_base_frequency.cc', 'src/huge_pages.cc'],
dependencies : [atomic_queue, xenium, moodycamel, tbb, dl]
)
endif