-
Notifications
You must be signed in to change notification settings - Fork 112
/
CMakeLists.txt
56 lines (43 loc) · 1.36 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
cmake_minimum_required(VERSION 3.5)
project(webserver)
set(CMAKE_CXX_STANDARD 11)
#aux_source_directory(version_0.1/test SRC_DIR)
#aux_source_directory(version_0.3/src SRC_DIR)
#set(SOURCE_FILES
# version_0.2/src/httpparse.cpp
# version_0.2/src/httpresponse.cpp
# version_0.2/src/main.cpp
# version_0.2/src/server.cpp
# version_0.2/src/ssocket.cpp
# version_0.2/src/ThreadPool.cpp
# version_0.2/src/Util.cpp
# )
set(CXX_FLAGS
-Wall
-std=c++11
-lpthread
-Wno-unused-parameter
-O3
)
link_libraries(pthread)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS_DEBUG "-O3")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
set(SOURCE_FILES
version_0.3/src/http/http_request.cpp
version_0.3/src/http/http_data.cpp
version_0.3/src/http/http_parse.cpp
version_0.3/src/http/http_response.cpp
version_0.3/src/http/server.cpp
version_0.3/src/util/util.cpp
version_0.3/src/util/ini_file.cpp
version_0.3/src/util/ini_section.cpp
version_0.3/src/util/logger.cpp
version_0.3/src/socket.cpp
version_0.3/src/thread_pool.cpp
version_0.3/src/timer.cpp
version_0.3/src/epoll.cpp
version_0.3/src/main.cpp
)
add_executable(webserver ${SOURCE_FILES})