mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
* Fix warnings * Port cmake scripts to linux * Add command line options for running test suites * Add examples to CMakeLists * Return std::uint64_t from writer::content_length * basic_parser::write takes asio::const_buffer instead of pointer and size * Turn message test back on now that it passes * Rename to http::headers, use std::allocator, remove http_headers * http::message::method is now a string * Refactor to_string for ConstBufferSequence * Remove chunk_encode from the public interface * Initialize members for default constructed iterators * Disallow default construction for dependent buffer sequences Refactor http::message serialization: * Serialization no longer creates a copy of the headers and modifies them * New function prepare(), sets Connection, Transfer-Encoding, Content-Length based on the body attributes and caller options. Callers can use prepare() to have the fields set automatically, or they can set the fields manually. * Use write for operator<< * Tests for serialization
53 lines
1.6 KiB
CMake
53 lines
1.6 KiB
CMake
# Part of Beast
|
|
|
|
cmake_minimum_required (VERSION 3.2)
|
|
|
|
project (Beast)
|
|
|
|
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
if (WIN32)
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /wd4100 /D_SCL_SECURE_NO_WARNINGS=1 /D_CRT_SECURE_NO_WARNINGS=1")
|
|
else()
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
set(Boost_USE_MULTITHREADED ON)
|
|
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
link_directories(${Boost_LIBRARY_DIR})
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
find_package(Threads)
|
|
|
|
set(CMAKE_CXX_FLAGS
|
|
"${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall /Wextra /Wpedantic /Wconversion -Wno-unused-variable")
|
|
endif()
|
|
|
|
message ("cxx Flags: " ${CMAKE_CXX_FLAGS})
|
|
|
|
macro(GroupSources curdir)
|
|
file(GLOB children RELATIVE ${PROJECT_SOURCE_DIR}/${curdir} ${PROJECT_SOURCE_DIR}/${curdir}/*)
|
|
foreach(child ${children})
|
|
if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/${curdir}/${child})
|
|
GroupSources(${curdir}/${child})
|
|
elseif(${child} STREQUAL "CMakeLists.txt")
|
|
source_group("" FILES ${PROJECT_SOURCE_DIR}/${curdir}/${child})
|
|
else()
|
|
string(REPLACE "/" "\\" groupname ${curdir})
|
|
string(REPLACE "src" "Common" groupname ${groupname})
|
|
source_group(${groupname} FILES ${PROJECT_SOURCE_DIR}/${curdir}/${child})
|
|
endif()
|
|
endforeach()
|
|
endmacro()
|
|
|
|
include_directories (include)
|
|
|
|
file(GLOB_RECURSE BEAST_INCLUDES
|
|
${PROJECT_SOURCE_DIR}/include/beast/*.hpp
|
|
${PROJECT_SOURCE_DIR}/include/beast/*.ipp
|
|
)
|
|
|
|
add_subdirectory (test)
|
|
add_subdirectory (examples)
|
|
|
|
#enable_testing()
|