-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
56 lines (40 loc) · 1.38 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
cmake_minimum_required(VERSION 3.5)
# Options.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DVERBOSE_ERRORS -fno-omit-frame-pointer -fsanitize=address -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# Project name.
project(dorylus LANGUAGES CXX)
# Include ZeroMQ.
find_library(ZMQ_LIB NAME libzmq.so HINTS /usr/lib/ /usr/local/lib/ REQUIRED)
set(ZMQ_INC /usr/local/include)
include_directories(${ZMQ_INC})
# Include BLAS/CBLAS
set(OBLIB /usr/local/blas/OpenBLAS/lib/libopenblas.a)
set(CBLIB /usr/local/blas/CBLAS/lib/cblas_LINUX.a)
set(CBINC /usr/local/blas/CBLAS/include)
include_directories(${CBINC})
# Include Boost lib.
find_package(Boost COMPONENTS system filesystem program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
# Include Threads lib.
find_package(Threads REQUIRED)
# Graph server (Data server).
if(BUILD_GRAPH)
message("Graph server: YES")
add_subdirectory(src/common)
add_subdirectory(src/graph-server ${PROJECT_SOURCE_DIR}/build/graph-server)
else()
message("Graph server: NO")
endif()
# Weight server.
if(BUILD_WEIGHT)
message("Weight server: YES")
add_subdirectory(src/common)
add_subdirectory(src/weight-server ${PROJECT_SOURCE_DIR}/build/weight-server)
else()
message("Weight server: NO")
endif()