-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
70 lines (58 loc) · 2.16 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
cmake_minimum_required(VERSION 3.7)
project(base_net_lib)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
set(CMAKE_CXX_STANDARD 11)
INCLUDE_DIRECTORIES(include)
INCLUDE_DIRECTORIES(
googletest/include
)
set(SOURCE_FILES
poller/poll_poller.cpp poller/poll_poller.h
poller/poller.h poller/poller.cpp
poller/epoll_poller.cpp poller/epoll_poller.h
socket/socket_buf.h socket/socket_buf.cpp
socket/tcp_socket.cpp socket/tcp_socket.h
event_loop.cpp event_loop.h
tcp_server.h tcp_server.cpp
channel.cpp channel.h
Acceptor.h Acceptor.cpp
tcp_connection.cpp tcp_connection.h
timerfd/time_stamp.h timerfd/time_stamp.cpp
timerfd/timer_fd.h timerfd/timer_fd.cpp
timerfd/TimeQueue.h timerfd/TimeQueue.cpp
timerfd/SortTimerList.cpp timerfd/SortTimerList.h
#memcached file
#memcached/mem_request.cpp memcached/mem_request.h
#memcached/data_structer.cpp memcached/data_structer.h
#memcached/mem_response.cpp memcached/mem_response.h
#memcached/user.cpp memcached/user.h
#memcached/MemServer.cpp memcached/MemServer.h
#memcached/mem_pool.h
proto/Protocol.cpp proto/Protocol.h
Server.h Server.cpp
Session.h Session.cpp
msg/msg.h msg/msg.cpp
msg/MsgSet.cpp msg/MsgSet.h
msg/MsgFactory.cpp msg/MsgFactory.h
consumer/ConsumerList.cpp
consumer/ConsumerList.h
include/common.h include/ScopeGuard.h
main.cpp
EventLoopThread.h EventLoopThread.cpp
EventLoopThreadPool.cpp
EventLoopThreadPool.h
thread/Thread.cpp
thread/Thread.h
thread/thread_pool.cpp
thread/thread_pool.h
thread/lock.cpp
thread/lock.h
)
add_executable(base_net_lib ${SOURCE_FILES})
target_link_libraries( # Start
base_net_lib # Name of executable
${PROJECT_SOURCE_DIR}/googletest/make/gtest_main.a
pthread# Name of library without "lib" prefix
)