mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
tests use lib_beast for cmake
This commit is contained in:
1
Jamfile
1
Jamfile
@@ -53,7 +53,6 @@ path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;
|
||||
|
||||
lib static_beast
|
||||
: test/lib_beast.cpp
|
||||
test/lib_asio.cpp
|
||||
: requirements
|
||||
[ requires
|
||||
cxx11_constexpr
|
||||
|
@@ -15,8 +15,6 @@ file (GLOB_RECURSE EXTRAS_FILES
|
||||
${PROJECT_SOURCE_DIR}/test/extras/include/*.ipp
|
||||
)
|
||||
|
||||
set (TEST_MAIN ${PROJECT_SOURCE_DIR}/include/boost/beast/_experimental/unit_test/main.cpp)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
link_libraries (${OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
@@ -44,6 +42,12 @@ set (ZLIB_SOURCES
|
||||
${CMAKE_CURRENT_LIST_DIR}/extern/zlib-1.2.11/zutil.c
|
||||
)
|
||||
|
||||
set (TEST_MAIN ${PROJECT_SOURCE_DIR}/test/lib_beast.cpp)
|
||||
|
||||
add_definitions (-DBOOST_BEAST_INCLUDE_TEST_MAIN)
|
||||
add_definitions (-DBOOST_ASIO_SEPARATE_COMPILATION)
|
||||
add_definitions (-DBOOST_BEAST_SPLIT_COMPILATION)
|
||||
|
||||
add_subdirectory (beast)
|
||||
add_subdirectory (bench)
|
||||
add_subdirectory (doc)
|
||||
|
@@ -12,6 +12,10 @@ GroupSources (example/common common)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/bench/wsload "/")
|
||||
|
||||
remove_definitions (-DBOOST_BEAST_INCLUDE_TEST_MAIN)
|
||||
remove_definitions (-DBOOST_ASIO_SEPARATE_COMPILATION)
|
||||
remove_definitions (-DBOOST_BEAST_SPLIT_COMPILATION)
|
||||
|
||||
add_executable (bench-wsload
|
||||
${BOOST_BEAST_FILES}
|
||||
${COMMON_FILES}
|
||||
|
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build the asio static library,
|
||||
// used with BOOST_ASIO_SEPARATE_COMPILATION which helps
|
||||
// reduce compilation time
|
||||
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
#include <boost/asio/ssl/impl/src.hpp>
|
@@ -7,9 +7,17 @@
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build the asio stbeastatic library,
|
||||
// used with BOOST_BEAST_SPLIT_COMPILATION which helps
|
||||
// reduce compilation time
|
||||
// This file is used to build a static library with
|
||||
// asio and beast definitions, to reduce compilation time.
|
||||
|
||||
// BOOST_ASIO_SEPARATE_COMPILATION for asio
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
#include <boost/asio/ssl/impl/src.hpp>
|
||||
|
||||
// BOOST_BEAST_SPLIT_COMPILATION for beast
|
||||
#include <boost/beast/src.hpp>
|
||||
//#include <boost/beast/ssl/impl/src.hpp>
|
||||
|
||||
#ifdef BOOST_BEAST_INCLUDE_TEST_MAIN
|
||||
#include <boost/beast/_experimental/unit_test/main.cpp>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user