-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
112 lines (96 loc) · 3.8 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
project('Polypheny-CPP-Driver', 'cpp', version : '1.0.0', default_options : ['cpp_std=c++17'])
add_project_arguments('-Wall', '-Wextra', '-w', '-fcompare-debug-second', language : 'cpp')
add_project_link_arguments('-lm', language : 'cpp')
# ========================
# Dependencies
# ========================
# prism api
polypheny_prism_api_subproject = subproject('polypheny_prism_api')
polypheny_prism_api_dep = polypheny_prism_api_subproject.get_variable('polypheny_prism_api_dep')
# pthreads
pthread_dep = dependency('threads')
# GNU Multiple Precision Arithmetic Library (used for BigDecimals)
gmp_dep = dependency('gmp', required : true, fallback : ['gmp', 'gmp_dep'])
gmpxx_dep = dependency('gmpxx', required : true, fallback : ['gmp', 'gmpxx_dep'])
# open ssl for transport security
openssl_subproject = subproject('openssl')
ssl_dep = openssl_subproject.get_variable('openssl_dep')
# ========================
# Test Dependencies
# ========================
# unit test system
catch2_subproject = subproject('catch2')
catch2_dep = catch2_subproject.get_variable('catch2_with_main_dep')
# ========================
# Library and Dependencies
# ========================
polypheny_inc = include_directories('include')
polypheny_src_inc = include_directories('src')
polypheny_src = files(
'src/connection/CallbackQueue.cpp',
'src/connection/Connection.cpp',
'src/transport/ConnectionClosedError.cpp',
'src/connection/ConnectionProperties.cpp',
'src/connection/Cursor.cpp',
'src/results/DocumentResult.cpp',
'src/results/GraphElement.cpp',
'src/results/GraphResult.cpp',
'src/results/Edge.cpp',
'src/results/Node.cpp',
'src/types/Interval.cpp',
'src/types/File.cpp',
'src/transport/SocketTransport.cpp',
'src/transport/UnixTransport.cpp',
'src/transport/PlainTcpTransport.cpp',
'src/transport/SecureTcpTransport.cpp',
'src/connection/PrismInterfaceClient.cpp',
'src/utils/ProtoUtils.cpp',
'src/utils/TypedValueUtils.cpp',
'src/results/RelationalColumnMetadata.cpp',
'src/results/RelationalMetadata.cpp',
'src/results/RelationalResult.cpp',
'src/results/Row.cpp',
'src/results/ScalarResult.cpp',
'src/connection/ServerError.cpp',
'src/types/TypedValue.cpp',
'src/streaming/StreamingIndex.cpp',
'src/streaming/PrismOutputStream.cpp',
'src/streaming/BinaryPrismOutputStream.cpp',
'src/streaming/FilePrismOutputStream.cpp',
'src/streaming/StringPrismOutputStream.cpp',
'src/streaming/StringPrismInputStream.cpp'
)
polypheny_cpp_driver_lib = library('polypheny_cpp_library',
polypheny_src,
dependencies : [pthread_dep, polypheny_prism_api_dep, gmp_dep, gmpxx_dep, ssl_dep],
include_directories : [polypheny_inc, polypheny_src_inc],
)
polypheny_cpp_driver_dep = declare_dependency(
link_with : polypheny_cpp_driver_lib,
include_directories : [polypheny_inc, polypheny_src_inc],
dependencies : [pthread_dep, polypheny_prism_api_dep, gmp_dep, gmpxx_dep]
)
# ========================
# Tests
# ========================
test_src = files(
'tests/Init.cpp',
'tests/IntervalTest.cpp',
'tests/CallbackQueueTest.cpp',
'tests/ConnectionClosedErrorTest.cpp',
'tests/ConnectionPropertiesTest.cpp',
'tests/ProtoUtilsTest.cpp',
'tests/TypedValueTest.cpp',
'tests/StreamingTest.cpp',
)
test_exe = executable('runTests',
test_src + polypheny_src,
dependencies : [catch2_dep, pthread_dep, polypheny_prism_api_dep, gmp_dep, gmpxx_dep, ssl_dep],
include_directories : [polypheny_inc, polypheny_src_inc],
install : true
)
test('runTests', test_exe)
# ========================
# Examples
# ========================
subdir('examples')