-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
62 lines (45 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8)
project(echo_test)
#if (MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
#endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g")
include_directories(.)
add_subdirectory(gtest)
add_library(http STATIC
http_parser.cpp
http_printer.cpp
http_common.cpp
sub_string.cpp)
add_library(common STATIC
address.cpp
epoll.cpp
pipe.cpp
socket.cpp
throw_error.cpp
timer.cpp
file_descriptor.cpp
)
add_executable(echo_server
main_echo_server.cpp
echo_server.cpp
)
target_link_libraries(echo_server common)
add_executable(echo_test
main_echo_test.cpp
echo_tester.cpp
)
target_link_libraries(echo_test common)
add_executable(http_parser_test
http_parser_test.cpp
)
target_link_libraries(http_parser_test http gtest pthread)
add_executable(http_server
http_server.cpp
main_http_server.cpp
)
target_link_libraries(http_server common http pthread)
add_executable(resolve
resolve_main.cpp
)
target_link_libraries(resolve common)