-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
56 lines (44 loc) · 2.87 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
49
50
51
52
53
54
55
56
project('simple-requests-library', 'cpp', default_options : ['cpp_std=c++14'])
if get_option('network-library') == 'boost_asio'
add_project_arguments('-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
'-DBOOST_COROUTINE_NO_DEPRECATION_WARNING', language : 'cpp')
network_dep = dependency('boost', modules : ['system', 'chrono', 'context', 'coroutine', 'regex'])
endif
doctest_includes = include_directories('thirdParty/doctest/')
doctest_dep = declare_dependency(include_directories : doctest_includes)
executable('functional_tests', ['src/gdg/srl/alias.hpp',
'src/gdg/srl/exceptions.hpp',
'src/gdg/srl/srl.cpp',
'src/gdg/srl/srl.hpp'],
dependencies :
[network_dep,
doctest_dep,
dependency('threads')],
include_directories : include_directories('src'),
cpp_args : ['-DUSE_' + get_option('network-library').to_upper(),
'-DUSE_' + get_option('string-view-library').to_upper()],
build_by_default : false)
simple_requests = static_library('simple_requests', ['src/gdg/srl/alias.hpp',
'src/gdg/srl/exceptions.hpp',
'src/gdg/srl/srl.cpp',
'src/gdg/srl/srl.hpp'],
dependencies :
[network_dep,
doctest_dep],
include_directories : include_directories('src'),
cpp_args : ['-DUSE_' + get_option('network-library').to_upper(),
'-DUSE_' + get_option('string-view-library').to_upper(),
'-DDOCTEST_CONFIG_DISABLE'])
simple_requests_dep = declare_dependency(link_with : simple_requests,
include_directories : include_directories('src'),
compile_args : ['-DUSE_' + get_option('network-library').to_upper(),
'-DUSE_' + get_option('string-view-library').to_upper(),
'-DDOCTEST_CONFIG_DISABLE'],
dependencies : [network_dep, doctest_dep,
dependency('threads')])
executable('get_urls', 'examples/get_urls.cpp',
dependencies : [simple_requests_dep],
cpp_args : ['-DUSE_' + get_option('network-library').to_upper(),
'-DUSE_' + get_option('string-view-library').to_upper(),
'-DDOCTEST_CONFIG_DISABLE'],
build_by_default : false)