diff --git a/CHANGELOG.md b/CHANGELOG.md index 80638f68..cf111387 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 238: + +* Refactor Jamfiles to work with release layout + +-------------------------------------------------------------------------------- + Version 237: * cmake: Use static libs to speed up builds diff --git a/CMakeLists.txt b/CMakeLists.txt index 2691d10a..ed13f8e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,7 +173,7 @@ endif() #------------------------------------------------------------------------------- add_definitions (-DBOOST_ASIO_SEPARATE_COMPILATION=1) -add_definitions (-DBOOST_BEAST_SPLIT_COMPILATION=1) +add_definitions (-DBOOST_BEAST_SEPARATE_COMPILATION=1) GroupSources (test "/") diff --git a/Jamfile b/Jamfile index 86ad3187..b3172341 100644 --- a/Jamfile +++ b/Jamfile @@ -64,13 +64,13 @@ local defines = /boost//headers . BOOST_ALL_NO_LIB=1 - BOOST_BEAST_SPLIT_COMPILATION BOOST_ASIO_SEPARATE_COMPILATION BOOST_ASIO_NO_DEPRECATED=1 BOOST_ASIO_DISABLE_BOOST_ARRAY=1 BOOST_ASIO_DISABLE_BOOST_BIND=1 BOOST_ASIO_DISABLE_BOOST_DATE_TIME=1 BOOST_ASIO_DISABLE_BOOST_REGEX=1 + BOOST_BEAST_SEPARATE_COMPILATION BOOST_COROUTINES_NO_DEPRECATION_WARNING=1 msvc:"/bigobj" msvc-14.1:"/permissive-" @@ -96,21 +96,31 @@ local defines = haiku:network ; -lib static_beast - : test/_lib_beast.cpp +lib lib-asio + : test/lib_asio.cpp : requirements - $(defines) - ./test/extras/include + static + $(defines) : usage-requirements - $(defines) - ./test/extras/include + $(defines) ; -lib static_ssl_asio - : test/_lib_ssl.cpp +lib lib-asio-ssl + : test/lib_asio_ssl.cpp : requirements - /boost/beast//static_beast/static + static + $(defines) [ ac.check-library /boost/beast//ssl : /boost/beast//ssl/shared : no ] [ ac.check-library /boost/beast//crypto : /boost/beast//crypto/shared : no ] : usage-requirements + $(defines) + ; + +lib lib-beast + : test/lib_beast.cpp + : requirements + static + $(defines) + : usage-requirements + $(defines) ; diff --git a/doc/qbk/release_notes.qbk b/doc/qbk/release_notes.qbk index dba7eb51..e737d8be 100644 --- a/doc/qbk/release_notes.qbk +++ b/doc/qbk/release_notes.qbk @@ -11,59 +11,6 @@ [/-----------------------------------------------------------------------------] -[/ - -* [phrase library..[@/libs/beast/ Beast]:] - '''BIG Update!!!''' The - [@/libs/beast/doc/html/beast/quickref.html reference] - shows a star '''''' next to each new item. - * Beast needs your help! - * [@https://github.com/boostorg/beast/wiki/Companies-and-Individuals-Using-Beast Tell Us] - how you or your company use Beast - * Please - [@https://github.com/boostorg/beast/issues/new report] - any bugs, feature requests, or general feedback - * Join the [@https://cppalliance.org/slack/ [*C++ Slack Workspace]] for - free and chat with us in the #beast and #boost channels - * Don't forget to [@https://github.com/boostorg/beast star the repository] \u2b50! - * More tutorials, code like the pros! - * [@/libs/beast/doc/html/beast/using_asio/asio_refresher.html Networking Refresher] - teaches you from the ground up. - * Updated [@/libs/beast/doc/html/beast/using_io/writing_composed_operations/echo.html Asynchronous Echo] example - * Updated [@/libs/beast/doc/html/beast/using_io/writing_composed_operations/detect_ssl.html [*Detect SSL]] composed operation tutorial - * [@/libs/beast/example/websocket/server/chat-multi websocket-chat-multi] - threaded chat server with a JavaScript - [@/libs/beast/example/websocket/server/chat-multi/chat_client.html browser client] - * [@/libs/beast/doc/html/beast/ref/boost__beast__basic_stream.html `basic_stream`] and - [@/libs/beast/doc/html/beast/ref/boost__beast__tcp_stream.html `tcp_stream`] offer: - * Timeouts: `async_read_some`, `async_write_some` complete with - [@/libs/beast/doc/html/beast/ref/boost__beast__error.html `error::timeout`] on expiration! - * Traffic-shaping policies - [@/libs/beast/doc/html/beast/ref/boost__beast__simple_rate_policy.html `simple`] and - [@/libs/beast/doc/html/beast/ref/boost__beast__unlimited_rate_policy.html `unlimited`], - or a user-defined - [@/libs/beast/doc/html/beast/concepts/RatePolicy.html ['RatePolicy]]! - * Put the strand directly on the socket using - [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1322r0.html P1322R0], - no more `bind_executor` at call sites! - * Base classes - [@/libs/beast/doc/html/beast/ref/boost__beast__async_base.html `async_base`] and - [@/libs/beast/doc/html/beast/ref/boost__beast__stable_async_base.html `stable_async_base`] and - handle all composed operation boilerplate for you. - * [@/libs/beast/doc/html/beast/ref/boost__beast__ssl_stream.html `ssl_stream`] provides a - movable, assignable SSL stream with a flat write optimization. - * All asynchronous operations use Asio's `async_initiate` for efficient integration with Coroutines TS. - * \u26a1 [*['faster compilation]], define `BOOST_BEAST_SPLIT_COMPILATION` and - `#include <`[@/libs/beast/include/boost/beast/src.hpp `boost/beast/src.hpp`]`>` - in one of your .cpp files! - * See the full - [@/libs/beast/doc/html/beast/release_notes.html Release Notes] - for a complete list of changes. - -] - -[/-----------------------------------------------------------------------------] - [heading Boost 1.70] [tip diff --git a/example/Jamfile b/example/Jamfile index cccbfe4b..0a78a0b2 100644 --- a/example/Jamfile +++ b/example/Jamfile @@ -7,6 +7,23 @@ # Official repository: https://github.com/boostorg/beast # +import testing ; +import ../../config/checks/config : requires ; + +project /boost/beast/example + : requirements + [ requires + cxx11_constexpr + cxx11_decltype + cxx11_hdr_tuple + #cxx11_sfinae_expr # Every MSVC fails this + cxx11_template_aliases + cxx11_variadic_templates + ] + /boost/beast//lib-asio/static + /boost/beast//lib-beast/static + ; + build-project advanced ; build-project http ; build-project websocket ; diff --git a/example/advanced/server-flex/Jamfile b/example/advanced/server-flex/Jamfile index 4be00904..e7bd844a 100644 --- a/example/advanced/server-flex/Jamfile +++ b/example/advanced/server-flex/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe advanced-server-flex : diff --git a/example/advanced/server/Jamfile b/example/advanced/server/Jamfile index f99c06e1..5f9ceecd 100644 --- a/example/advanced/server/Jamfile +++ b/example/advanced/server/Jamfile @@ -12,5 +12,4 @@ exe advanced-server : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/echo-op/Jamfile b/example/echo-op/Jamfile index a710a542..caeb767e 100644 --- a/example/echo-op/Jamfile +++ b/example/echo-op/Jamfile @@ -12,5 +12,4 @@ exe echo-op : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/client/async-ssl/Jamfile b/example/http/client/async-ssl/Jamfile index 30afc8a8..c11bcb07 100644 --- a/example/http/client/async-ssl/Jamfile +++ b/example/http/client/async-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-client-async-ssl : diff --git a/example/http/client/async/Jamfile b/example/http/client/async/Jamfile index afd2ab39..abc9d4d6 100644 --- a/example/http/client/async/Jamfile +++ b/example/http/client/async/Jamfile @@ -12,5 +12,4 @@ exe http-client-async : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/client/coro-ssl/Jamfile b/example/http/client/coro-ssl/Jamfile index ea3fbc28..f2c126c5 100644 --- a/example/http/client/coro-ssl/Jamfile +++ b/example/http/client/coro-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-client-coro-ssl : diff --git a/example/http/client/coro/Jamfile b/example/http/client/coro/Jamfile index dc4661f0..25ebe2fd 100644 --- a/example/http/client/coro/Jamfile +++ b/example/http/client/coro/Jamfile @@ -12,6 +12,5 @@ exe http-client-coro : : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/http/client/crawl/Jamfile b/example/http/client/crawl/Jamfile index 4be2f6eb..8f94c967 100644 --- a/example/http/client/crawl/Jamfile +++ b/example/http/client/crawl/Jamfile @@ -13,5 +13,4 @@ exe http-crawl : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/client/sync-ssl/Jamfile b/example/http/client/sync-ssl/Jamfile index 6de4e1fc..c1fabf47 100644 --- a/example/http/client/sync-ssl/Jamfile +++ b/example/http/client/sync-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-client-sync-ssl : diff --git a/example/http/client/sync/Jamfile b/example/http/client/sync/Jamfile index 64ec8fb9..969246f6 100644 --- a/example/http/client/sync/Jamfile +++ b/example/http/client/sync/Jamfile @@ -12,5 +12,4 @@ exe http-client-sync : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/server/async-ssl/Jamfile b/example/http/server/async-ssl/Jamfile index 1a3a0fc4..f4cf0204 100644 --- a/example/http/server/async-ssl/Jamfile +++ b/example/http/server/async-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-server-async-ssl : diff --git a/example/http/server/async/Jamfile b/example/http/server/async/Jamfile index 187a9a45..f36d1ad4 100644 --- a/example/http/server/async/Jamfile +++ b/example/http/server/async/Jamfile @@ -12,5 +12,4 @@ exe http-server-async : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/server/coro-ssl/Jamfile b/example/http/server/coro-ssl/Jamfile index 36065a02..8870f65d 100644 --- a/example/http/server/coro-ssl/Jamfile +++ b/example/http/server/coro-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-server-coro-ssl : diff --git a/example/http/server/coro/Jamfile b/example/http/server/coro/Jamfile index 52e9eb61..600b0fa0 100644 --- a/example/http/server/coro/Jamfile +++ b/example/http/server/coro/Jamfile @@ -12,6 +12,5 @@ exe http-server-coro : : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/http/server/fast/Jamfile b/example/http/server/fast/Jamfile index c1865e10..7c23c5ad 100644 --- a/example/http/server/fast/Jamfile +++ b/example/http/server/fast/Jamfile @@ -7,15 +7,10 @@ # Official repository: https://github.com/boostorg/beast # -# VFALCO _GLIBCXX_USE_CXX11_ABI is to work around -# a bug in libg++8 where it attempts to default-construct -# the allocator (even when it is not default constructible) - exe http-server-fast : http_server_fast.cpp : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/http/server/flex/Jamfile b/example/http/server/flex/Jamfile index 922df82d..f094caa2 100644 --- a/example/http/server/flex/Jamfile +++ b/example/http/server/flex/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-server-flex : diff --git a/example/http/server/small/Jamfile b/example/http/server/small/Jamfile index 4de891a7..48e9fd13 100644 --- a/example/http/server/small/Jamfile +++ b/example/http/server/small/Jamfile @@ -12,5 +12,4 @@ exe http-server-small : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/server/stackless-ssl/Jamfile b/example/http/server/stackless-ssl/Jamfile index d345d05d..b4752464 100644 --- a/example/http/server/stackless-ssl/Jamfile +++ b/example/http/server/stackless-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-server-stackless-ssl : diff --git a/example/http/server/stackless/Jamfile b/example/http/server/stackless/Jamfile index 3498f5f6..f82934ff 100644 --- a/example/http/server/stackless/Jamfile +++ b/example/http/server/stackless/Jamfile @@ -12,5 +12,4 @@ exe http-server-stackless : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/http/server/sync-ssl/Jamfile b/example/http/server/sync-ssl/Jamfile index e0575b6d..0ad5e57f 100644 --- a/example/http/server/sync-ssl/Jamfile +++ b/example/http/server/sync-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe http-server-sync-ssl : diff --git a/example/http/server/sync/Jamfile b/example/http/server/sync/Jamfile index 3c9ecd10..30e4f026 100644 --- a/example/http/server/sync/Jamfile +++ b/example/http/server/sync/Jamfile @@ -12,5 +12,4 @@ exe http-server-sync : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/client/async-ssl/Jamfile b/example/websocket/client/async-ssl/Jamfile index 53b7399d..1f46a94d 100644 --- a/example/websocket/client/async-ssl/Jamfile +++ b/example/websocket/client/async-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-client-async-ssl : diff --git a/example/websocket/client/async/Jamfile b/example/websocket/client/async/Jamfile index efbd2f69..e5359db3 100644 --- a/example/websocket/client/async/Jamfile +++ b/example/websocket/client/async/Jamfile @@ -12,5 +12,4 @@ exe websocket-client-async : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/client/coro-ssl/Jamfile b/example/websocket/client/coro-ssl/Jamfile index e8cb7e26..f6f1bb92 100644 --- a/example/websocket/client/coro-ssl/Jamfile +++ b/example/websocket/client/coro-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-client-coro-ssl : diff --git a/example/websocket/client/coro/Jamfile b/example/websocket/client/coro/Jamfile index 6d96d866..761dfe8f 100644 --- a/example/websocket/client/coro/Jamfile +++ b/example/websocket/client/coro/Jamfile @@ -12,6 +12,5 @@ exe websocket-client-coro : : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/websocket/client/sync-ssl/Jamfile b/example/websocket/client/sync-ssl/Jamfile index 9879957a..0cfec0f6 100644 --- a/example/websocket/client/sync-ssl/Jamfile +++ b/example/websocket/client/sync-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-client-sync-ssl : diff --git a/example/websocket/client/sync/Jamfile b/example/websocket/client/sync/Jamfile index a0d5d0e2..ea71a0ce 100644 --- a/example/websocket/client/sync/Jamfile +++ b/example/websocket/client/sync/Jamfile @@ -12,5 +12,4 @@ exe websocket-client-sync : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/server/async-ssl/Jamfile b/example/websocket/server/async-ssl/Jamfile index 913fd7b4..f9b253a0 100644 --- a/example/websocket/server/async-ssl/Jamfile +++ b/example/websocket/server/async-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-server-async-ssl : diff --git a/example/websocket/server/async/Jamfile b/example/websocket/server/async/Jamfile index 5e9a3ff8..e1e63e14 100644 --- a/example/websocket/server/async/Jamfile +++ b/example/websocket/server/async/Jamfile @@ -12,5 +12,4 @@ exe websocket-server-async : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/server/chat-multi/Jamfile b/example/websocket/server/chat-multi/Jamfile index debea868..a8d49bfd 100644 --- a/example/websocket/server/chat-multi/Jamfile +++ b/example/websocket/server/chat-multi/Jamfile @@ -16,5 +16,4 @@ exe websocket-chat-multi : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/server/coro-ssl/Jamfile b/example/websocket/server/coro-ssl/Jamfile index 2b486803..621b0ce5 100644 --- a/example/websocket/server/coro-ssl/Jamfile +++ b/example/websocket/server/coro-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-server-coro-ssl : diff --git a/example/websocket/server/coro/Jamfile b/example/websocket/server/coro/Jamfile index 36ecef66..5e8cbf94 100644 --- a/example/websocket/server/coro/Jamfile +++ b/example/websocket/server/coro/Jamfile @@ -12,6 +12,5 @@ exe websocket-server-coro : : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/websocket/server/fast/Jamfile b/example/websocket/server/fast/Jamfile index f5332274..3e6cbf5b 100644 --- a/example/websocket/server/fast/Jamfile +++ b/example/websocket/server/fast/Jamfile @@ -12,6 +12,5 @@ exe websocket-server-fast : : coverage:no ubasan:no - /boost/beast//static_beast/static /boost/coroutine//boost_coroutine ; diff --git a/example/websocket/server/stackless-ssl/Jamfile b/example/websocket/server/stackless-ssl/Jamfile index 60aa5307..b0eaa4aa 100644 --- a/example/websocket/server/stackless-ssl/Jamfile +++ b/example/websocket/server/stackless-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-server-stackless-ssl : diff --git a/example/websocket/server/stackless/Jamfile b/example/websocket/server/stackless/Jamfile index d4548e6b..ce9ab898 100644 --- a/example/websocket/server/stackless/Jamfile +++ b/example/websocket/server/stackless/Jamfile @@ -12,5 +12,4 @@ exe websocket-server-stackless : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/example/websocket/server/sync-ssl/Jamfile b/example/websocket/server/sync-ssl/Jamfile index 9bd803fa..55ac35b8 100644 --- a/example/websocket/server/sync-ssl/Jamfile +++ b/example/websocket/server/sync-ssl/Jamfile @@ -11,7 +11,7 @@ import ac ; project : requirements - [ ac.check-library /boost/beast//static_ssl_asio : /boost/beast//static_ssl_asio/static : no ] + [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] ; exe websocket-server-sync-ssl : diff --git a/example/websocket/server/sync/Jamfile b/example/websocket/server/sync/Jamfile index 3b2c69b8..7fd14ce4 100644 --- a/example/websocket/server/sync/Jamfile +++ b/example/websocket/server/sync/Jamfile @@ -12,5 +12,4 @@ exe websocket-server-sync : : coverage:no ubasan:no - /boost/beast//static_beast/static ; diff --git a/include/boost/beast/_experimental/unit_test/main.cpp b/include/boost/beast/_experimental/unit_test/main.ipp similarity index 100% rename from include/boost/beast/_experimental/unit_test/main.cpp rename to include/boost/beast/_experimental/unit_test/main.ipp diff --git a/include/boost/beast/core/detail/config.hpp b/include/boost/beast/core/detail/config.hpp index 67c614af..bebe8c79 100644 --- a/include/boost/beast/core/detail/config.hpp +++ b/include/boost/beast/core/detail/config.hpp @@ -68,9 +68,9 @@ namespace net = boost::asio; #endif // Default to a header-only implementation. The user must specifically -// request separate compilation by defining BOOST_BEAST_SPLIT_COMPILATION +// request separate compilation by defining BOOST_BEAST_SEPARATE_COMPILATION #ifndef BOOST_BEAST_HEADER_ONLY -# ifndef BOOST_BEAST_SPLIT_COMPILATION +# ifndef BOOST_BEAST_SEPARATE_COMPILATION # define BOOST_BEAST_HEADER_ONLY 1 # endif #endif diff --git a/include/boost/beast/src.hpp b/include/boost/beast/src.hpp index 5d8f94a3..188d675f 100644 --- a/include/boost/beast/src.hpp +++ b/include/boost/beast/src.hpp @@ -13,7 +13,7 @@ /* This file is meant to be included once, in a translation unit of -the program, with the macro BOOST_BEAST_SPLIT_COMPILATION defined. +the program, with the macro BOOST_BEAST_SEPARATE_COMPILATION defined. */ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1260a09c..9e474bc1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -49,15 +49,11 @@ GroupSources (. "/") add_library ( lib-test STATIC - ${PROJECT_SOURCE_DIR}/include/boost/beast/_experimental/unit_test/main.cpp + ${CMAKE_CURRENT_LIST_DIR}/lib_test.cpp ) set_property(TARGET lib-test PROPERTY FOLDER "static-libs") -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) diff --git a/test/Jamfile b/test/Jamfile index fde63211..19d5b0e0 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -10,10 +10,14 @@ import testing ; import ../../config/checks/config : requires ; -lib test_main - : $(TEST_MAIN) +lib lib-test + : lib_test.cpp : requirements - + static + $(defines) + : usage-requirements + ./extras/include + $(defines) ; project /boost/beast/test @@ -22,15 +26,15 @@ project /boost/beast/test cxx11_constexpr cxx11_decltype cxx11_hdr_tuple -# cxx11_sfinae_expr # Every MSVC fails this + #cxx11_sfinae_expr # Every MSVC fails this cxx11_template_aliases cxx11_variadic_templates ] ./extern BOOST_BEAST_ALLOW_DEPRECATED BOOST_BEAST_TESTS - /boost/beast//static_ssl_asio/static - /boost/beast/test//test_main/static + /boost/beast//lib-asio/static + /boost/beast//lib-beast/static /boost/filesystem//boost_filesystem /boost/coroutine//boost_coroutine ; diff --git a/test/_lib_beast.cpp b/test/_lib_beast.cpp deleted file mode 100644 index 489284f9..00000000 --- a/test/_lib_beast.cpp +++ /dev/null @@ -1,22 +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 a static library with -// asio and beast definitions, to reduce compilation time. - -// BOOST_ASIO_SEPARATE_COMPILATION for asio -#include - -// BOOST_BEAST_SPLIT_COMPILATION for beast -#include -//#include - -#ifdef BOOST_BEAST_INCLUDE_TEST_MAIN -#include -#endif diff --git a/test/beast/_experimental/Jamfile b/test/beast/_experimental/Jamfile index cefb68fb..2070f097 100644 --- a/test/beast/_experimental/Jamfile +++ b/test/beast/_experimental/Jamfile @@ -17,15 +17,22 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) ] ; + RUN_TESTS += [ run $(f) + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(SOURCES) ; +exe fat-tests : + $(SOURCES) + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(SOURCES) : : : : run-fat-tests ; +run $(SOURCES) + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/beast/core/Jamfile b/test/beast/core/Jamfile index 33d260a4..9d8db7f4 100644 --- a/test/beast/core/Jamfile +++ b/test/beast/core/Jamfile @@ -61,15 +61,22 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) ] ; + RUN_TESTS += [ run $(f) + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(SOURCES) ; +exe fat-tests : + $(SOURCES) + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(SOURCES) : : : : run-fat-tests ; +run $(SOURCES) + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/beast/http/Jamfile b/test/beast/http/Jamfile index 37d65aa8..f96155d6 100644 --- a/test/beast/http/Jamfile +++ b/test/beast/http/Jamfile @@ -36,15 +36,22 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) ] ; + RUN_TESTS += [ run $(f) + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(SOURCES) ; +exe fat-tests : + $(SOURCES) + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(SOURCES) : : : : run-fat-tests ; +run $(SOURCES) + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/beast/ssl/Jamfile b/test/beast/ssl/Jamfile index a5a2bf12..5a47939b 100644 --- a/test/beast/ssl/Jamfile +++ b/test/beast/ssl/Jamfile @@ -15,15 +15,26 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) ] ; + RUN_TESTS += [ run $(f) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(SOURCES) ; +exe fat-tests + : + $(SOURCES) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(SOURCES) : : : : run-fat-tests ; +run $(SOURCES) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/beast/websocket/Jamfile b/test/beast/websocket/Jamfile index 8b20f31d..43ec8aff 100644 --- a/test/beast/websocket/Jamfile +++ b/test/beast/websocket/Jamfile @@ -37,15 +37,26 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) ] ; + RUN_TESTS += [ run $(f) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(SOURCES) ; +exe fat-tests + : + $(SOURCES) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(SOURCES) : : : : run-fat-tests ; +run $(SOURCES) + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/beast/zlib/Jamfile b/test/beast/zlib/Jamfile index 16f0dd90..b191a242 100644 --- a/test/beast/zlib/Jamfile +++ b/test/beast/zlib/Jamfile @@ -18,15 +18,27 @@ local RUN_TESTS ; for local f in $(SOURCES) { - RUN_TESTS += [ run $(f) $(ZLIB_SOURCES) ] ; + RUN_TESTS += [ run $(f) + $(ZLIB_SOURCES) + /boost/beast/test//lib-test + ] ; } alias run-tests : $(RUN_TESTS) ; -exe fat-tests : $(ZLIB_SOURCES) $(SOURCES) ; +exe fat-tests + : + $(ZLIB_SOURCES) + $(SOURCES) + /boost/beast/test//lib-test + ; explicit fat-tests ; -run $(ZLIB_SOURCES) $(SOURCES) : : : : run-fat-tests ; +run + $(ZLIB_SOURCES) + $(SOURCES) + /boost/beast/test//lib-test + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/bench/Jamfile b/test/bench/Jamfile index dd201edb..44bae113 100644 --- a/test/bench/Jamfile +++ b/test/bench/Jamfile @@ -12,5 +12,5 @@ alias run-tests : parser//run-tests wsload//run-tests utf8_checker//run-tests - #zlib//run-tests # Not built + #zlib//run-tests # Not built, too slow ; diff --git a/test/bench/buffers/Jamfile b/test/bench/buffers/Jamfile index f2b29c2d..c73d8a11 100644 --- a/test/bench/buffers/Jamfile +++ b/test/bench/buffers/Jamfile @@ -8,8 +8,8 @@ # exe bench-buffers : - bench_buffers.cpp + /boost/beast/test//lib-test ; explicit bench-buffers ; diff --git a/test/bench/parser/Jamfile b/test/bench/parser/Jamfile index 005fb7c9..43629fc3 100644 --- a/test/bench/parser/Jamfile +++ b/test/bench/parser/Jamfile @@ -7,7 +7,12 @@ # Official repository: https://github.com/boostorg/beast # -run nodejs_parser.cpp bench_parser.cpp : : : : bench-parser ; +run + nodejs_parser.cpp + bench_parser.cpp + /boost/beast/test//lib-test + : : : : + bench-parser ; explicit bench-parser ; diff --git a/test/bench/utf8_checker/Jamfile b/test/bench/utf8_checker/Jamfile index 05a322b9..1d352f38 100644 --- a/test/bench/utf8_checker/Jamfile +++ b/test/bench/utf8_checker/Jamfile @@ -7,9 +7,9 @@ # Official repository: https://github.com/boostorg/beast # -exe bench-utf8-checker : - - bench_utf8_checker.cpp +exe bench-utf8-checker : bench_utf8_checker.cpp + : requirements + /boost/beast/test//lib-test ; explicit bench-utf8-checker ; diff --git a/test/bench/zlib/Jamfile b/test/bench/zlib/Jamfile index eefe3d1e..6e210c29 100644 --- a/test/bench/zlib/Jamfile +++ b/test/bench/zlib/Jamfile @@ -9,7 +9,7 @@ exe bench-zlib : $(ZLIB_SOURCES) - deflate_stream.cpp inflate_stream.cpp + /boost/beast/test//lib-test ; diff --git a/test/doc/Jamfile b/test/doc/Jamfile index dcbc47fd..86ce518f 100644 --- a/test/doc/Jamfile +++ b/test/doc/Jamfile @@ -7,27 +7,12 @@ # Official repository: https://github.com/boostorg/beast # -alias run-tests : - [ compile core_snippets.cpp ] - [ compile http_snippets.cpp ] - [ run core_1_refresher.cpp ] - [ run core_3_timeouts.cpp ] - [ run core_4_layers.cpp ] - [ run http_10_custom_parser.cpp ] - [ run http_examples.cpp ] - [ run websocket.cpp ] - [ run websocket_1_connecting.cpp ] - [ run websocket_2_handshaking.cpp ] - [ run websocket_3_decorator.cpp ] - [ run websocket_4_messages.cpp ] - [ run websocket_5_control_frames.cpp ] - [ run websocket_6_timeouts.cpp ] - [ run websocket_7_teardown.cpp ] - [ run websocket_8_notes.cpp ] +local libs = + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test ; -exe fat-tests : - +local SOURCES = core_1_refresher.cpp core_3_timeouts.cpp core_4_layers.cpp @@ -44,8 +29,29 @@ exe fat-tests : websocket_8_notes.cpp ; +local RUN_TESTS ; + +RUN_TESTS += + [ compile core_snippets.cpp $(libs) ] + [ compile http_snippets.cpp $(libs) ] + ; + +for local f in $(SOURCES) +{ + RUN_TESTS += [ run $(f) $(libs) ] ; +} + +alias run-tests : $(RUN_TESTS) ; + +exe fat-tests : + $(SOURCES) + $(libs) + ; + explicit fat-tests ; -run fat-tests : : : : run-fat-tests ; +run $(SOURCES) + $(libs) + : : : : run-fat-tests ; explicit run-fat-tests ; diff --git a/test/example/common/Jamfile b/test/example/common/Jamfile index db4516a2..6ae40e51 100644 --- a/test/example/common/Jamfile +++ b/test/example/common/Jamfile @@ -14,13 +14,14 @@ local SOURCES = local RUN_TESTS ; +local libs = + /boost/beast//lib-asio-ssl + /boost/beast/test//lib-test + ; + for local f in $(SOURCES) { - RUN_TESTS += [ compile $(f) ] ; + RUN_TESTS += [ run $(f) $(libs) ] ; } alias run-tests : $(RUN_TESTS) ; - -alias build-fat : run-tests ; - -explicit build-fat ; diff --git a/test/_lib_ssl.cpp b/test/lib_test.cpp similarity index 60% rename from test/_lib_ssl.cpp rename to test/lib_test.cpp index 16710878..12e6614d 100644 --- a/test/_lib_ssl.cpp +++ b/test/lib_test.cpp @@ -7,9 +7,7 @@ // Official repository: https://github.com/boostorg/beast // -// This file is used to build a static library with -// asio and beast definitions, to reduce compilation time. +// This file is used to build a static library -// BOOST_ASIO_SEPARATE_COMPILATION for asio::ssl +#include -#include