-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
144 lines (138 loc) · 8.3 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
cmake_minimum_required(VERSION 3.5)
project(ipc_direct)
set(CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra")
if (COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif (COMMAND cmake_policy)
add_library(hrd SHARED rdma/hrd_conn.cc rdma/hrd_util.cc)
target_link_libraries(hrd ibverbs memcached numa pthread)
add_library(ipc SHARED common/helper.c lib/setup_sock_lib.cpp lib/socket_lib.cpp lib/file_lib.cpp lib/poll_lib.cpp lib/lib.cpp common/interprocess_t.cpp
lib/lib_internal.h common/setup_sock.h common/darray.hpp common/locklessqueue_n.hpp lib/fork.cpp
common/locklessq_v2.hpp lib/rdma_lib.cpp lib/rdma_lib.h common/rdma.cpp common/rdma.h common/rdma_struct.h
common/locklessq_v2_rdma.hpp)
target_link_libraries(ipc hrd dl pthread ibverbs)
add_library(ipc-common SHARED common/helper.c lib/pot_socket_lib.cpp lib/pot_socket_lib.h common/rdma.cpp)
target_link_libraries(ipc-common hrd dl pthread ibverbs)
add_executable(monitor common/helper.c monitor/setup_sock_monitor.cpp monitor/process.cpp monitor/sock_monitor.cpp
monitor/main.cpp common/interprocess_t.cpp common/setup_sock.h common/locklessqueue_n.hpp common/adjlist_t.hpp
common/metaqueue.h monitor/rdma_monitor.cpp monitor/rdma_monitor.h common/rdma.cpp common/interprocess_t_n.hpp)
target_link_libraries(monitor pthread ibverbs)
#add_executable(test_attach test/test_attach.c)
#add_executable(test_attach_old test/test_attach_old.c)
#target_link_libraries(test_attach ipc)
#add_executable(test_metaqueue common/helper.c test/test_metaqueue.c)
#target_link_libraries(test_metaqueue pthread)
# add_executable(test_fork test/test_fork.c)
# target_link_libraries(test_fork ipc)
# add_executable(test_pthread test/test_pthread.c)
# target_link_libraries(test_pthread ipc pthread)
add_executable(test_socket test/test_socket.c)
target_link_libraries(test_socket ipc)
add_executable(test_sock_server test/test_sock_server.cpp)
add_executable(test_sock_client test/test_sock_client.c)
target_link_libraries(test_sock_server ipc)
target_link_libraries(test_sock_client ipc)
add_executable(test_sock_pingpong_server test/test_sock_pingpong_server.cpp)
add_executable(test_sock_pingpong_client test/test_sock_pingpong_client.cpp)
target_link_libraries(test_sock_pingpong_server ipc)
target_link_libraries(test_sock_pingpong_client ipc)
add_executable(test_http_client test/test_http_client.c)
target_link_libraries(test_http_client pthread)
add_executable(test_memcached_client test/test_memcached_client.c common/helper.c)
target_link_libraries(test_memcached_client pthread)
add_executable(test_interprocess_t test/test_interprocess_t.cpp common/interprocess_t.cpp common/helper.c common/rdma.cpp)
target_link_libraries(test_interprocess_t pthread ibverbs)
add_executable(test_darray test/test_daary.cpp common/darray.hpp)
target_link_libraries(test_darray ipc)
add_executable(test_epoll_server test/test_epoll_server.c)
target_link_libraries(test_epoll_server ipc)
add_executable(test_epoll_client test/test_epoll_client.c)
target_link_libraries(test_epoll_client ipc)
add_executable(test_sock_server_2 test/test_sock_server_2.cpp)
target_link_libraries(test_sock_server_2 ipc)
add_executable(test_sock_client_2 test/test_sock_client_2.c)
target_link_libraries(test_sock_client_2 ipc)
add_executable(test_sock_server_3 test/test_sock_server_3.cpp)
target_link_libraries(test_sock_server_3 ipc)
add_executable(test_sock_client_3 test/test_sock_client_3.c)
target_link_libraries(test_sock_client_3 ipc)
add_executable(lat_sock_onetime_client test/lat_sock_onetime_client.c)
target_link_libraries(lat_sock_onetime_client ipc)
add_executable(lat_sock_onetime_server test/lat_sock_onetime_server.cpp)
target_link_libraries(lat_sock_onetime_server ipc)
add_executable(demo_cpu_util test/demo_cpu_util.c common/util.c)
add_executable(test_locklessqueue_n test/test_locklessqueue_n.cpp common/helper.c common/rdma.cpp)
add_executable(test_locklessq_v2 test/test_locklessq_v2.cpp common/locklessq_v2.hpp common/helper.c common/helper.h)
add_executable(test_locklessq_v3 test/test_locklessq_v3.cpp common/locklessq_v3.hpp common/helper.c common/helper.h)
target_link_libraries(test_locklessq_v2 pthread)
target_link_libraries(test_locklessqueue_n pthread ibverbs)
target_link_libraries(test_locklessq_v3 pthread)
add_executable(test_adjlist test/test_adjlist.cpp)
add_executable(test_fork_client test/test_fork_client.c)
target_link_libraries(test_fork_client ipc)
add_executable(test_fork_server test/test_fork_server.c)
target_link_libraries(test_fork_server ipc)
add_executable(test_fork_client_2 test/test_fork_client_2.c)
target_link_libraries(test_fork_client_2 ipc)
add_executable(test_fork_server_2 test/test_fork_server_2.c)
target_link_libraries(test_fork_server_2 ipc)
add_executable(pot_eval_lat_s pot/eval_lat_s.cpp)
target_link_libraries(pot_eval_lat_s ipc-common)
add_executable(pot_eval_lat_c pot/eval_lat_c.c)
target_link_libraries(pot_eval_lat_c ipc-common)
add_executable(pot_eval_linux_lat_s pot/eval_linux_lat_s.cpp common/helper.c common/helper.h)
add_executable(pot_eval_linux_lat_c pot/eval_linux_lat_c.c common/helper.c common/helper.h)
target_link_libraries(pot_eval_linux_lat_c pthread)
target_link_libraries(pot_eval_linux_lat_s pthread)
add_executable(pot_eval_linux_tput_s pot/eval_linux_tput_s.cpp common/helper.c common/helper.h)
add_executable(pot_eval_linux_tput_c pot/eval_linux_tput_c.c common/helper.c common/helper.h)
target_link_libraries(pot_eval_linux_tput_s pthread)
target_link_libraries(pot_eval_linux_tput_c pthread)
add_executable(pot_eval_linux_create_s pot/eval_linux_create_s.cpp common/helper.c common/helper.h)
add_executable(pot_eval_linux_create_c pot/eval_linux_create_c.c common/helper.c common/helper.h)
target_link_libraries(pot_eval_linux_create_s pthread)
target_link_libraries(pot_eval_linux_create_c pthread)
add_executable(pot_eval_create_s pot/eval_create_s.cpp)
target_link_libraries(pot_eval_create_s ipc-common)
add_executable(pot_eval_create_c pot/eval_create_c.c)
target_link_libraries(pot_eval_create_c ipc-common)
add_executable(pot_eval_create_c_m pot/eval_create_c_m.cpp)
target_link_libraries(pot_eval_create_c_m pthread)
add_executable(pot_eval_fork_s pot/eval_fork_s.cpp)
target_link_libraries(pot_eval_fork_s ipc-common)
add_executable(pot_eval_fork_c pot/eval_fork_c.c)
target_link_libraries(pot_eval_fork_c ipc-common)
add_executable(pot_eval_tput_s pot/eval_tput_s.cpp)
target_link_libraries(pot_eval_tput_s ipc-common)
add_executable(pot_eval_tput_c pot/eval_tput_c.c)
target_link_libraries(pot_eval_tput_c ipc-common)
add_executable(pot_eval_linux_tput_diffconnnum_s pot/eval_linux_tput_diffconnnum_s.cpp common/helper.c common/helper.h)
add_executable(pot_eval_linux_tput_diffconnnum_c pot/eval_linux_tput_diffconnnum_c.c common/helper.c common/helper.h)
target_link_libraries(pot_eval_linux_tput_diffconnnum_s pthread)
target_link_libraries(pot_eval_linux_tput_diffconnnum_c pthread)
add_executable(pot_eval_tput_diffconnnum_s pot/eval_tput_diffconnnum_s.cpp)
target_link_libraries(pot_eval_tput_diffconnnum_s ipc-common)
add_executable(pot_eval_tput_diffconnnum_c pot/eval_tput_diffconnnum_c.c)
target_link_libraries(pot_eval_tput_diffconnnum_c ipc-common)
add_executable(pot_eval_rdma_lat_s pot/eval_rdma_lat_s.cpp)
target_link_libraries(pot_eval_rdma_lat_s ipc-common)
add_executable(pot_eval_rdma_lat_c pot/eval_rdma_lat_c.c)
target_link_libraries(pot_eval_rdma_lat_c ipc-common)
add_executable(pot_eval_rdma_tput_s pot/eval_rdma_tput_s.cpp)
target_link_libraries(pot_eval_rdma_tput_s ipc-common)
add_executable(pot_eval_rdma_tput_c pot/eval_rdma_tput_c.c)
target_link_libraries(pot_eval_rdma_tput_c ipc-common)
add_executable(pot_eval_rdma_tput_diffconnnum_s pot/eval_rdma_tput_diffconnnum_s.cpp)
target_link_libraries(pot_eval_rdma_tput_diffconnnum_s ipc-common)
add_executable(pot_eval_rdma_tput_diffconnnum_c pot/eval_rdma_tput_diffconnnum_c.c)
target_link_libraries(pot_eval_rdma_tput_diffconnnum_c ipc-common)
add_executable(pot_web_service test/demo_web_service.c)
target_link_libraries(pot_web_service memcached pthread)
add_executable(rdma_throughput rdma/throughput.cpp)
target_link_libraries(rdma_throughput hrd gflags)
add_executable(rdma_latency rdma/latency.cpp)
target_link_libraries(rdma_latency hrd gflags)
#add_executable(zerocopy zerocopy/zerocopy.c common/helper.c)
#target_link_libraries(zerocopy pthread)