This repository has been archived by the owner on Jan 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
CMakeLists.txt
102 lines (72 loc) · 3.19 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
cmake_minimum_required (VERSION 3.2)
################################################################################
set(CMAKE_BUILD_TYPE Debug)
set(GLOB BOOST_VERSION 1.58)
################################################################################
project (club-lib)
find_package(Boost ${BOOST_VERSION} COMPONENTS REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wall -ggdb")
include_directories(
"${Boost_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/src/club")
file(GLOB sources
"${CMAKE_SOURCE_DIR}/src/club/*.cpp"
"${CMAKE_SOURCE_DIR}/src/club/net/*.cpp"
"${CMAKE_SOURCE_DIR}/src/club/net/PL/*.cpp"
"${CMAKE_SOURCE_DIR}/src/club/transport/*.cpp")
add_library(club ${sources})
################################################################################
project (club-tests)
find_package(Boost ${BOOST_VERSION} COMPONENTS system unit_test_framework REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 \
-pthread \
-ggdb \
-ftemplate-backtrace-limit=0")
include_directories(
"${Boost_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/src/club")
file(GLOB sources "${CMAKE_SOURCE_DIR}/tests/*.cpp")
add_executable(club-tests ${sources})
target_link_libraries(club-tests ${Boost_LIBRARIES} club)
################################################################################
project (rendezvous-server)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost ${BOOST_VERSION} COMPONENTS system program_options REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread")
include_directories(
"${Boost_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/src/rendezvous")
file(GLOB sources "${CMAKE_SOURCE_DIR}/src/rendezvous/server.cpp")
add_executable(rendezvous-server ${sources})
target_link_libraries(rendezvous-server ${Boost_LIBRARIES})
################################################################################
project (club-chat)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost ${BOOST_VERSION} COMPONENTS system program_options REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread")
include_directories(
"${Boost_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/include")
file(GLOB sources "${CMAKE_SOURCE_DIR}/demo/club-chat.cpp")
add_executable(club-chat ${sources})
target_link_libraries(club-chat ${Boost_LIBRARIES} club)
################################################################################
project (transport-speed-bench)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost ${BOOST_VERSION} COMPONENTS system program_options REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread")
include_directories(
"${Boost_INCLUDE_DIR}"
"${CMAKE_SOURCE_DIR}/include")
file(GLOB sources "${CMAKE_SOURCE_DIR}/demo/transport-speed-bench.cpp")
add_executable(transport-speed-bench ${sources})
target_link_libraries(transport-speed-bench ${Boost_LIBRARIES} club)
################################################################################