forked from arangodb/arangodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
318 lines (289 loc) · 9.17 KB
/
CMakeLists.txt
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# -*- mode: CMAKE; -*-
add_compile_warnings_flags()
################################################################################
## LIB_ARANGO
################################################################################
if (MSVC)
set(LIB_ARANGO_MSVC
Basics/win-utils.cpp
Zip/iowin32.cpp
)
else ()
set(LIB_ARANGO_POSIX
Endpoint/EndpointUnixDomain.cpp
Endpoint/EndpointSrv.cpp
)
endif ()
set(LIB_ARANGO_LINENOISE
Utilities/LinenoiseShell.cpp
Utilities/LineEditor.cpp
Utilities/ShellBase.cpp
)
set(LIB_ARANGO_DATE
${PROJECT_SOURCE_DIR}/3rdParty/date/src/tz.cpp
)
add_definitions("-DHAS_REMOTE_API=0")
add_definitions("-DARCHITECTURE_OPTIMIZATIONS=\"${ARCHITECTURE_OPTIMIZATIONS}\"")
add_library(arango_static_strings STATIC
Basics/StaticStrings.cpp
)
set(FROZEN_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/3rdParty/iresearch/external/frozen/include")
set(FUNCTION2_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/3rdParty/iresearch/external/function2")
add_library(arango_lightweight STATIC
ApplicationFeatures/ApplicationFeature.cpp
ApplicationFeatures/ApplicationServer.cpp
ApplicationFeatures/ShellColorsFeature.cpp
Basics/ArangoGlobalContext.cpp
Basics/CleanupFunctions.cpp
Basics/ErrorCode.cpp
Basics/Exceptions.cpp Basics/Exceptions.tpp Basics/Exceptions.h
Basics/FileResult.cpp
Basics/FileUtils.cpp
Basics/Guarded.h
Basics/Identifier.cpp
Basics/InputProcessors.cpp
Basics/NumberOfCores.cpp
Basics/PageSize.cpp
Basics/PhysicalMemory.cpp
Basics/ReadWriteLock.cpp
Basics/RebootId.cpp Basics/RebootId.h
Basics/Result.cpp
Basics/ResultError.cpp Basics/ResultError.tpp Basics/ResultError.h
Basics/StringBuffer.cpp
Basics/StringHeap.cpp
Basics/StringUtils.cpp
Basics/Thread.cpp
Basics/UnshackledMutex.cpp
Basics/application-exit.cpp
Basics/conversions.cpp
Basics/debugging.cpp
Basics/error.cpp
Basics/files.cpp
Basics/fpconv.cpp
Basics/levenshtein.cpp
Basics/memory.cpp
Basics/process-utils.cpp
Basics/signals.cpp
Basics/SourceLocation.cpp
Basics/system-functions.cpp
Basics/tri-strings.cpp
Containers/ImmerMemoryPolicy.h
Logger/Escaper.cpp
Logger/LogAppender.cpp
Logger/LogAppenderFile.cpp
Logger/LogAppenderSyslog.cpp
Logger/LogContext.cpp
Logger/LogLevel.cpp
Logger/LogThread.cpp
Logger/LogTopic.cpp
Logger/Logger.cpp
Logger/LoggerFeature.cpp
Logger/LoggerStream.cpp
Logger/LogTimeFormat.cpp
ProgramOptions/IniFileParser.cpp
ProgramOptions/Option.cpp
ProgramOptions/Parameters.cpp
ProgramOptions/ProgramOptions.cpp
ProgramOptions/Section.cpp
ProgramOptions/Translator.cpp
ProgramOptions/UnitsHelper.cpp
Random/RandomGenerator.cpp
)
if (MSVC)
target_sources(arango_lightweight PRIVATE
Basics/terminal-utils-win32.cpp
Basics/threads-win32.cpp
)
else ()
target_sources(arango_lightweight PRIVATE
Basics/terminal-utils-posix.cpp
Basics/threads-posix.cpp
)
endif ()
target_include_directories(arango_lightweight PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# some auto-generated headers live here, like "Basics/build.h"
target_include_directories(arango_lightweight PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(arango_lightweight PUBLIC
${FROZEN_INCLUDE_DIR}
${FUNCTION2_INCLUDE_DIR}
)
# Rebuild generated error files so they are up-to-date when all
# dependent stuff is built
add_dependencies(arango_lightweight errorfiles)
add_dependencies(arango_lightweight exitcodefiles)
target_link_libraries(arango_lightweight
PUBLIC velocypack
arango_inspection
absl::flat_hash_set
absl::synchronization
PRIVATE date_interface
fmt
arango_assertions
arango_static_strings
arango_futures
boost_boost
boost_system)
# Enterprise
if (USE_ENTERPRISE)
target_compile_definitions(arango_lightweight PUBLIC "-DUSE_ENTERPRISE=1")
target_include_directories(arango_lightweight PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}")
endif()
add_library(arango STATIC
${LIB_ARANGO_APPLE}
${LIB_ARANGO_MSVC}
${LIB_ARANGO_POSIX}
${LIB_ARANGO_LINENOISE}
${LIB_ARANGO_DATE}
${LIB_ASM_SOURCES}
ApplicationFeatures/ApplicationFeaturePhase.cpp
ApplicationFeatures/BumpFileDescriptorsFeature.cpp
ApplicationFeatures/CommunicationFeaturePhase.cpp
ApplicationFeatures/ConfigFeature.cpp
ApplicationFeatures/FileSystemFeature.cpp
ApplicationFeatures/GreetingsFeature.cpp
ApplicationFeatures/LanguageFeature.cpp
ApplicationFeatures/OptionsCheckFeature.cpp
ApplicationFeatures/ShutdownFeature.cpp
ApplicationFeatures/TempFeature.cpp
ApplicationFeatures/VersionFeature.cpp
Assertions/AssertionConditionalLogger.cpp
Assertions/AssertionLogger.cpp
Basics/AttributeNameParser.cpp
Basics/CpuUsageSnapshot.cpp
Basics/DebugRaceController.cpp
Basics/EncodingUtils.cpp
Basics/FeatureFlags.cpp
Basics/FileDescriptors.cpp
Basics/FunctionUtils.cpp
Basics/GlobalResourceMonitor.cpp
Basics/HybridLogicalClock.cpp
Basics/IndexIter.h
Basics/LdapUrlParser.cpp
Basics/LocalTaskQueue.cpp
Basics/Nonce.cpp
Basics/NumberUtils.cpp
Basics/ReadWriteSpinLock.cpp
Basics/ResourceUsage.cpp
Basics/RocksDBLogger.cpp
Basics/RocksDBUtils.cpp
Basics/StringBufferAdvanced.cpp
Basics/Utf8Helper.cpp
Basics/VelocyPackHelper.cpp
Basics/csv.cpp
Basics/datetime.cpp
Basics/fasthash.cpp
Basics/files-advanced.cpp
Basics/hashes.cpp
Basics/socket-utils.cpp
Basics/terminal-utils.cpp
Basics/tri-zip.cpp
Containers/MerkleTree.cpp
Containers/MerkleTreeHelpers.cpp
Endpoint/Endpoint.cpp
Endpoint/EndpointIp.cpp
Endpoint/EndpointIpV4.cpp
Endpoint/EndpointIpV6.cpp
Endpoint/EndpointList.cpp
Maskings/AttributeMasking.cpp
Maskings/Collection.cpp
Maskings/MaskingFunction.cpp
Maskings/Maskings.cpp
Maskings/Path.cpp
Maskings/RandomMask.cpp
Maskings/RandomStringMask.cpp
Random/RandomFeature.cpp
Random/UniformCharacter.cpp
Rest/CommonDefines.cpp
Rest/GeneralRequest.cpp
Rest/GeneralResponse.cpp
Rest/HttpRequest.cpp
Rest/HttpResponse.cpp
Rest/PathMatch.h
Rest/Version.cpp
Rest/VstRequest.cpp
Rest/VstResponse.cpp
SimpleHttpClient/ClientConnection.cpp
SimpleHttpClient/ConnectionCache.cpp
SimpleHttpClient/GeneralClientConnection.cpp
SimpleHttpClient/HttpResponseChecker.cpp
SimpleHttpClient/SimpleHttpClient.cpp
SimpleHttpClient/SimpleHttpResult.cpp
SimpleHttpClient/SslClientConnection.cpp
Ssl/SslFeature.cpp
Ssl/SslInterface.cpp
Ssl/ssl-helper.cpp
Utilities/NameValidator.cpp
Utilities/ScriptLoader.cpp
Zip/ioapi.cpp
Zip/unzip.cpp
Zip/zip.cpp
)
if (USE_V8)
target_sources(arango PRIVATE
ApplicationFeatures/V8PlatformFeature.cpp)
endif()
target_link_libraries(arango
PUBLIC s2
arango_build_id
boost_system
boost_boost
arango_futures
arango_static_strings
arango_crashhandler
velocypack
linenoise-ng
date_interface
${SYSTEM_LIBRARIES}
${ICU_LIBS}
absl::crc32c
absl::flat_hash_set
absl::flat_hash_map
absl::node_hash_set
absl::node_hash_map
absl::synchronization
absl::strings
arango_lightweight)
if (USE_V8)
target_link_libraries(arango PUBLIC ${V8_LIBS})
endif()
target_link_libraries(arango PUBLIC fmt::fmt)
# this is "."
target_include_directories(arango PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# some auto-generated headers live here, like "Basics/build.h"
target_include_directories(arango PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(arango PUBLIC ${BUILD_DIR})
target_include_directories(arango SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIR})
target_include_directories(arango SYSTEM PUBLIC ${ICU_INCLUDE_DIR})
target_link_libraries(arango PUBLIC rocksdb_interface)
target_link_libraries(arango PUBLIC zlib_interface)
if (USE_V8)
target_link_libraries(arango PUBLIC v8_interface)
endif()
add_dependencies(arango v8_build)
add_dependencies(arango snappy)
target_link_libraries(arango PUBLIC snappy)
set(SNAPPY_INCLUDE_DIR "${SNAPPY_SOURCE_DIR};${SNAPPY_BUILD_DIR}" CACHE PATH "relation to snappy")
if (USE_LIBUNWIND)
target_link_libraries(arango PUBLIC ${LIBUNWIND_LIB})
target_include_directories(arango PRIVATE "${LIBUNWIND_HOME}/include")
add_dependencies(arango libunwind_build)
endif ()
# Rebuild generated error files so they are up-to-date when all
# dependent stuff is built
add_dependencies(arango errorfiles)
add_dependencies(arango exitcodefiles)
# Enterprise
if (USE_ENTERPRISE)
target_compile_definitions(arango PUBLIC "-DUSE_ENTERPRISE=1")
target_include_directories(arango PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}")
endif()
add_subdirectory(Futures)
add_subdirectory(Geo)
if (USE_V8)
add_subdirectory(V8)
endif()
add_subdirectory(VelocypackUtils)
add_subdirectory(CrashHandler)
add_subdirectory(Assertions)
add_subdirectory(Inspection)
add_subdirectory(BuildId)