-
Notifications
You must be signed in to change notification settings - Fork 24
/
CMakeLists.txt
197 lines (185 loc) · 8.52 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
cmake_minimum_required(VERSION 3.10)
project(JasmineGraph)
set(CMAKE_CXX_STANDARD 11)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(HEADERS globals.h
src/backend/JasmineGraphBackend.h
src/backend/JasmineGraphBackendProtocol.h
src/centralstore/JasmineGraphHashMapCentralStore.h
src/centralstore/JasmineGraphHashMapDuplicateCentralStore.h
src/exception/JasmineGraphException.h
src/frontend/JasmineGraphFrontEnd.h
src/frontend/JasmineGraphFrontEndProtocol.h
src/frontend/core/CoreConstants.h
src/frontend/core/domain/JobRequest.h
src/frontend/core/domain/JobResponse.h
src/frontend/core/executor/AbstractExecutor.h
src/frontend/core/executor/impl/TriangleCountExecutor.h
src/frontend/core/executor/impl/StreamingTriangleCountExecutor.h
src/frontend/core/factory/ExecutorFactory.h
src/frontend/core/scheduler/JobScheduler.h
src/localstore/JasmineGraphHashMapLocalStore.h
src/localstore/JasmineGraphLocalStore.h
src/localstore/JasmineGraphLocalStoreFactory.h
src/localstore/incremental/JasmineGraphIncrementalLocalStore.h
src/metadb/SQLiteDBInterface.h
src/ml/trainer/JasmineGraphTrainingSchedular.h
src/partitioner/local/JSONParser.h
src/partitioner/local/MetisPartitioner.h
src/partitioner/local/RDFParser.h
src/partitioner/local/RDFPartitioner.h
src/partitioner/stream/Partition.h
src/partitioner/stream/Partitioner.h
src/performance/metrics/PerformanceUtil.h
src/performance/metrics/StatisticCollector.h
src/performancedb/PerformanceSQLiteDBInterface.h
src/query/algorithms/linkprediction/JasminGraphLinkPredictor.h
src/query/algorithms/triangles/Triangles.h
src/query/algorithms/triangles/StreamingTriangles.h
src/scale/scaler.h
src/server/JasmineGraphInstance.h
src/server/JasmineGraphInstanceFileTransferService.h
src/server/JasmineGraphInstanceProtocol.h
src/server/JasmineGraphInstanceService.h
src/server/JasmineGraphServer.h
src/util/Conts.h
src/util/Utils.h
src/util/dbutil/attributestore_generated.h
src/util/dbutil/edgestore_generated.h
src/util/dbutil/partedgemapstore_generated.h
src/util/kafka/KafkaCC.h
src/util/kafka/StreamHandler.h
src/util/kafka/InstanceStreamHandler.h
src/util/logger/Logger.h
src/util/scheduler/Cron.h
src/util/scheduler/InterruptableSleep.h
src/util/scheduler/Scheduler.h
src/util/scheduler/SchedulerService.h
src/util/scheduler/ctpl_stl.h
src/k8s/K8sInterface.h
src/nativestore/NodeManager.h
src/nativestore/NodeBlock.h
src/nativestore/PropertyLink.h
src/nativestore/PropertyEdgeLink.h
src/nativestore/RelationBlock.h
src/nativestore/DataPublisher.h
src/partitioner/stream/Partition.h
src/k8s/K8sWorkerController.h
src/streamingdb/StreamingSQLiteDBInterface.h
src/frontend/core/executor/impl/PageRankExecutor.h
src/util/dbinterface/DBInterface.h
)
set(SOURCES src/backend/JasmineGraphBackend.cpp
src/backend/JasmineGraphBackendProtocol.cpp
src/centralstore/JasmineGraphHashMapCentralStore.cpp
src/centralstore/JasmineGraphHashMapDuplicateCentralStore.cpp
src/exception/JasmineGraphException.cpp
src/frontend/JasmineGraphFrontEnd.cpp
src/frontend/JasmineGraphFrontEndProtocol.cpp
src/frontend/core/CoreConstants.cpp
src/frontend/core/domain/JobRequest.cpp
src/frontend/core/domain/JobResponse.cpp
src/frontend/core/executor/AbstractExecutor.cpp
src/frontend/core/executor/impl/TriangleCountExecutor.cpp
src/frontend/core/executor/impl/StreamingTriangleCountExecutor.cpp
src/frontend/core/factory/ExecutorFactory.cpp
src/frontend/core/scheduler/JobScheduler.cpp
src/localstore/JasmineGraphHashMapLocalStore.cpp
src/localstore/JasmineGraphLocalStore.cpp
src/localstore/JasmineGraphLocalStoreFactory.cpp
src/localstore/incremental/JasmineGraphIncrementalLocalStore.cpp
src/metadb/SQLiteDBInterface.cpp
src/ml/trainer/JasmineGraphTrainingSchedular.cpp
src/partitioner/local/JSONParser.cpp
src/partitioner/local/MetisPartitioner.cpp
src/partitioner/local/RDFParser.cpp
src/partitioner/local/RDFPartitioner.cpp
src/partitioner/stream/Partition.cpp
src/partitioner/stream/Partitioner.cpp
src/performance/metrics/PerformanceUtil.cpp
src/performance/metrics/StatisticCollector.cpp
src/performancedb/PerformanceSQLiteDBInterface.cpp
src/query/algorithms/linkprediction/JasminGraphLinkPredictor.cpp
src/query/algorithms/triangles/Triangles.cpp
src/query/algorithms/triangles/StreamingTriangles.cpp
src/scale/scaler.cpp
src/server/JasmineGraphInstance.cpp
src/server/JasmineGraphInstanceFileTransferService.cpp
src/server/JasmineGraphInstanceProtocol.cpp
src/server/JasmineGraphInstanceService.cpp
src/server/JasmineGraphServer.cpp
src/util/Conts.cpp
src/util/Utils.cpp
src/util/kafka/KafkaCC.cpp
src/util/kafka/StreamHandler.cpp
src/util/kafka/InstanceStreamHandler.cpp
src/util/logger/Logger.cpp
src/util/scheduler/SchedulerService.cpp
src/k8s/K8sInterface.cpp
src/nativestore/NodeManager.cpp
src/nativestore/NodeBlock.cpp
src/nativestore/PropertyLink.cpp
src/nativestore/PropertyEdgeLink.cpp
src/nativestore/RelationBlock.cpp
src/nativestore/DataPublisher.cpp
src/partitioner/stream/Partition.cpp
src/k8s/K8sWorkerController.cpp
src/streamingdb/StreamingSQLiteDBInterface.cpp
src/frontend/core/executor/impl/PageRankExecutor.cpp
src/util/dbinterface/DBInterface.cpp
)
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
add_compile_options(-DUNIT_TEST)
endif ()
add_library(JasmineGraphLib ${HEADERS} ${SOURCES})
add_executable(JasmineGraph main.h main.cpp)
target_compile_definitions(JasmineGraphLib PUBLIC ROOT_DIR="${CMAKE_CURRENT_SOURCE_DIR}/")
if (CMAKE_ENABLE_DEBUG)
message(STATUS "DEBUG enabled")
target_compile_options(JasmineGraph PRIVATE -g)
endif ()
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s,--gc-sections")
#TODO: Need to install the library separately
target_link_libraries(JasmineGraphLib PRIVATE sqlite3)
target_link_libraries(JasmineGraphLib PRIVATE pthread)
target_link_libraries(JasmineGraphLib PRIVATE rdkafka)
target_link_libraries(JasmineGraphLib PRIVATE Threads::Threads)
target_link_libraries(JasmineGraphLib PRIVATE fmt)
target_link_libraries(JasmineGraphLib PRIVATE /usr/lib/x86_64-linux-gnu/libxerces-c.so)
target_link_libraries(JasmineGraphLib PRIVATE /usr/lib/x86_64-linux-gnu/libflatbuffers.a)
target_link_libraries(JasmineGraphLib PRIVATE /usr/lib/x86_64-linux-gnu/libjsoncpp.so)
target_link_libraries(JasmineGraphLib PRIVATE /usr/local/lib/libcppkafka.so)
target_link_libraries(JasmineGraph JasmineGraphLib)
target_link_libraries(JasmineGraph curl)
include_directories(/usr/local/include/yaml-cpp)
target_link_libraries(JasmineGraphLib PRIVATE m)
target_link_libraries(JasmineGraphLib PRIVATE /usr/local/lib/libkubernetes.so)
target_link_libraries(JasmineGraphLib PRIVATE yaml-cpp)
target_link_libraries(JasmineGraphLib PRIVATE curl)
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
# Include google test
include(FetchContent)
FetchContent_Declare(
googletest
DOWNLOAD_EXTRACT_TIMESTAMP true
URL https://github.com/google/googletest/archive/refs/tags/release-1.12.0.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_subdirectory(tests/unit)
enable_testing()
# Enable code coverage calculation
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -g -O0")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
include(CodeCoverage)
append_coverage_compiler_flags_to_target(JasmineGraphLib)
setup_target_for_coverage_gcovr_xml(
NAME coverage
EXECUTABLE JasmineGraphUnitTest
BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src"
)
endif ()