-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
109 lines (93 loc) · 2.29 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
cmake_minimum_required(VERSION 3.4.1)
project(firehose)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O5")
set(CMAKE_CXX_COMPILER "g++-9")
set(CXX "g++-9")
set(CC "gcc-9")
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_BUILD_TYPE Debug)
include(GNUInstallDirs)
include(FindProtobuf)
include_directories(
src/include
src
src/firehose
external
external/asio/asio
external/catch2
external/inih
external/termcolor
${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
#find_package(Boost 1.66.0 COMPONENTS system filesystem REQUIRED)
find_package(Boost 1.65.0 COMPONENTS system filesystem REQUIRED)
find_package(Threads REQUIRED)
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/include/firehose.proto)
add_library(firehose_proto ${PROTO_HDRS} ${PROTO_SRCS})
target_link_libraries(firehose_proto INTERFACE
${Protobuf_INCLUDE_DIR}
)
add_library( firehose
external/lz4.c
external/lz4hc.c
src/include/util.cpp
src/include/thread.cpp
src/firehose/api/api_common.cpp
src/include/network.cpp
src/firehose/api/pump_api.cpp
src/firehose/api/publisher_api.cpp
src/firehose/api/engine_api.cpp
src/firehose/api/nuzzle_api.cpp
src/firehose/api/consumer_api.cpp
src/firehose/pump.cpp
src/firehose/publisher.cpp
src/firehose/engine.cpp
src/firehose/pump.cpp
src/firehose/nuzzle.cpp
src/firehose/publisher.cpp
src/firehose/consumer.cpp
)
target_link_libraries( firehose PUBLIC
firehose_proto
tbb
tracer
# Threads::Threads
${Boost_SYSTEM_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
)
add_executable (engine.x src/engine.cpp)
target_link_libraries(engine.x
firehose
firehose_proto
Threads::Threads
)
add_executable (pump.x src/pump.cpp)
target_link_libraries(pump.x
firehose
firehose_proto
Threads::Threads
)
# SET_TARGET_PROPERTIES(pump.x PROPERTIES COMPILE_FLAGS -pg)
add_executable (nuzzle.x src/nuzzle.cpp)
target_link_libraries(nuzzle.x
firehose
firehose_proto
Threads::Threads
)
add_executable (publisher.x src/publisher.cpp)
target_link_libraries(publisher.x
firehose
firehose_proto
Threads::Threads
)
add_executable (consumer.x src/consumer.cpp)
target_link_libraries(consumer.x
firehose
firehose_proto
Threads::Threads
)