Skip to content

Commit

Permalink
introduce http_server
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokin committed Feb 2, 2016
1 parent 915b695 commit c6ffd53
Show file tree
Hide file tree
Showing 15 changed files with 30,784 additions and 0 deletions.
26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@ 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
sub_string.cpp)

add_library(common STATIC
address.cpp
epoll.cpp
Expand All @@ -27,3 +40,16 @@ add_executable(echo_test
)

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)
10 changes: 10 additions & 0 deletions gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 2.8)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g")

#include_directories(..)

add_library(gtest STATIC
gtest.h
gtest_main.cc
gtest-all.cc)
Loading

0 comments on commit c6ffd53

Please sign in to comment.