mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
websocket:
* Move echo server to test/
* Fix warnings
* Fix maskgen being uncopyable
* Simplify utf8_checker special member declarations
* Fix stream move assignable when owning the next layer
* Add javadocs for stream special members
* Add stream unit tests
* Move throwing member definitions to the .ipp file
* Use get_lowest_layer in stream declaration
* Perform type checks at each call site instead of constructor
* Demote close_code to a non-class enum:
Otherwise, application specific close codes
cannot be assigned without using static_cast.
core:
* Add streambuf_readstream special members tests
* Add move assignment operator to streambuf_readstream
* Add detail/get_lowest_layer trait
* Add static_string tests
* Move static_string from websocket to core
54 lines
1.7 KiB
CMake
54 lines
1.7 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")
|
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
|
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()
|