diff --git a/Jamfile b/Jamfile deleted file mode 100644 index 8f53169855..0000000000 --- a/Jamfile +++ /dev/null @@ -1,136 +0,0 @@ -# -# Copyright (c) 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 -# - -import ac ; -import os ; -import path ; -import feature ; -import boost ; -import modules ; -import testing ; -import ../config/checks/config : requires ; - -using openssl ; -boost.use-project ; - -lib socket ; # SOLARIS, QNXNTO -lib nsl ; # SOLARIS -lib ws2_32 ; # NT -lib mswsock ; # NT -lib ipv6 ; # HPUX -lib network ; # HAIKU - -feature.feature boost.beast.allow-deprecated : on off : propagated ; - -feature.feature boost.beast.separate-compilation : on off : propagated ; - -variant beast_coverage - : debug - : "-msse4.2 --coverage" - "--coverage" - ; - -feature.feature boost.beast.valgrind : on : optional propagated composite ; -feature.compose on : BOOST_USE_VALGRIND ; - -variant beast_valgrind - : release - : on - ; - -variant beast_ubasan - : release - : "-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp" - "-fsanitize=address,undefined" - BOOST_USE_ASAN=1 - ; - -project /boost/beast ; - -local defines = - [ requires - cxx11_constexpr - cxx11_decltype - cxx11_hdr_tuple - cxx11_template_aliases - cxx11_variadic_templates - ] - /boost//headers - . - BOOST_ALL_NO_LIB=1 - 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_COROUTINES_NO_DEPRECATION_WARNING=1 - msvc:"/bigobj" - msvc-14.1:"/permissive-" - msvc-14.2:"/permissive-" - msvc:_SCL_SECURE_NO_WARNINGS=1 - msvc:_CRT_SECURE_NO_WARNINGS=1 - msvc:_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING - msvc:_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING - msvc,release:"/Ob2 /Oi /Ot" - linux:_XOPEN_SOURCE=600 - linux:_GNU_SOURCE=1 - solaris:_XOPEN_SOURCE=500 - solaris:__EXTENSIONS__ - solaris:socket - solaris:nsl - windows:_WIN32_WINNT=0x0601 - windows,gcc:ws2_32 - windows,gcc:mswsock - windows,gcc-cygwin:__USE_W32_SOCKETS - hpux,gcc:_XOPEN_SOURCE_EXTENDED - hpux:ipv6 - qnxnto:socket - haiku:network - on:BOOST_BEAST_ALLOW_DEPRECATED - on:BOOST_BEAST_SEPARATE_COMPILATION - ; - -lib lib-asio - : test/lib_asio.cpp - : requirements - static - $(defines) - : usage-requirements - $(defines) - ; - -if [ os.name ] = LINUX -{ - lib dl ; -} - -lib lib-asio-ssl - : test/lib_asio_ssl.cpp - : requirements - static - $(defines) - [ ac.check-library /openssl//ssl : /openssl//ssl/shared : no ] - [ ac.check-library /openssl//crypto : /openssl//crypto/shared : no ] - : usage-requirements - $(defines) - /openssl//ssl/shared - /openssl//crypto/shared - linux:dl - ; - - -lib lib-beast - : test/lib_beast.cpp - : requirements - static - $(defines) - : usage-requirements - $(defines) - ; diff --git a/build.jam b/build.jam new file mode 100644 index 0000000000..f81936c4c3 --- /dev/null +++ b/build.jam @@ -0,0 +1,74 @@ +# Copyright René Ferdinand Rivera Morell 2023-2024 +# 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) + +require-b2 5.2 ; + +import feature ; + +constant boost_dependencies : + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/config//boost_config + /boost/container//boost_container + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/endian//boost_endian + /boost/intrusive//boost_intrusive + /boost/logic//boost_logic + /boost/mp11//boost_mp11 + /boost/optional//boost_optional + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/static_assert//boost_static_assert + /boost/static_string//boost_static_string + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/type_index//boost_type_index + /boost/type_traits//boost_type_traits + /boost/winapi//boost_winapi ; + +project /boost/beast + : common-requirements + include + ; + +explicit + [ alias boost_beast : build//boost_beast ] + [ alias boost_beast_asio : build//boost_beast_asio ] + [ alias boost_beast_asio_ssl : build//boost_beast_asio_ssl ] + [ alias all : boost_beast boost_beast_asio boost_beast_asio_ssl example test ] + # Old-style targets. Remove once the rest of Beast changes. + [ alias lib-beast : boost_beast ] + [ alias lib-asio : boost_beast_asio ] + [ alias lib-asio-ssl : boost_beast_asio_ssl ] + ; + +call-if : boost-library beast + : install boost_beast boost_beast_asio boost_beast_asio_ssl + ; + +feature.feature boost.beast.allow-deprecated : on off : propagated ; +feature.feature boost.beast.separate-compilation : on off : propagated ; +feature.feature boost.beast.valgrind : on off : optional propagated ; + +variant beast_coverage + : debug + : "-msse4.2 --coverage" + "--coverage" + ; + +variant beast_valgrind + : release + : on + ; + +variant beast_ubasan + : release + : "-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp" + "-fsanitize=address,undefined" + BOOST_USE_ASAN=1 + ; + diff --git a/build/Jamfile b/build/Jamfile new file mode 100644 index 0000000000..b27ba56a48 --- /dev/null +++ b/build/Jamfile @@ -0,0 +1,99 @@ +# Copyright René Ferdinand Rivera Morell 2023-2024 +# 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) + +import ac ; +import-search /boost/config/checks ; +import config : requires ; +import os ; +import path ; + +local openssl-root ; +if [ os.on-windows ] +{ + openssl-root ?= [ os.environ OPENSSL_ROOT ] ; + if ! $(openssl-root) && [ path.glob "C:/OpenSSL" : lib include ] + { + openssl-root = "C:/OpenSSL" ; + } +} +using openssl : : $(openssl-root)/lib $(openssl-root)/include ; + +project + : source-location ../test + : common-requirements + $(boost_dependencies) + [ requires + cxx11_constexpr + cxx11_decltype + cxx11_hdr_tuple + cxx11_template_aliases + cxx11_variadic_templates + ] + BOOST_ALL_NO_LIB=1 + 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_COROUTINES_NO_DEPRECATION_WARNING=1 + msvc:"/bigobj" + msvc-14.1:"/permissive-" + msvc-14.2:"/permissive-" + msvc:_SCL_SECURE_NO_WARNINGS=1 + msvc:_CRT_SECURE_NO_WARNINGS=1 + msvc:_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING + msvc:_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING + msvc,release:"/Ob2 /Oi /Ot" + linux:_XOPEN_SOURCE=600 + linux:_GNU_SOURCE=1 + solaris:_XOPEN_SOURCE=500 + solaris:__EXTENSIONS__ + solaris:socket + solaris:nsl + windows:_WIN32_WINNT=0x0601 + windows,gcc:ws2_32 + windows,gcc:mswsock + windows,gcc-cygwin:__USE_W32_SOCKETS + hpux,gcc:_XOPEN_SOURCE_EXTENDED + hpux:ipv6 + qnxnto:socket + haiku:network + on:BOOST_USE_VALGRIND + on:BOOST_BEAST_ALLOW_DEPRECATED + on:BOOST_BEAST_SEPARATE_COMPILATION + ; + +explicit + [ searched-lib socket ] # SOLARIS, QNXNTO + [ searched-lib nsl ] # SOLARIS + [ searched-lib ws2_32 : : windows ] # NT + [ searched-lib mswsock : : windows ] # NT + [ searched-lib ipv6 ] # HPUX + [ searched-lib network ] # HAIKU + ; + +lib boost_beast_asio + : lib_asio.cpp + : requirements + static + ; + +lib boost_beast_asio_ssl + : lib_asio_ssl.cpp + : requirements + static + [ ac.check-library /openssl//ssl : /openssl//ssl/shared : no ] + [ ac.check-library /openssl//crypto : /openssl//crypto/shared : no ] + : usage-requirements + [ ac.check-library /openssl//ssl : /openssl//ssl/shared : no ] + [ ac.check-library /openssl//crypto : /openssl//crypto/shared : no ] + ; + +lib boost_beast + : lib_beast.cpp + : requirements + static + ; diff --git a/doc/Jamfile b/doc/Jamfile index 66c1d72eec..69782fdcfb 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -10,7 +10,8 @@ project beast/doc ; import boostbook ; import type ; -import ../../../tools/docca/docca.jam ; +import-search /boost/docca ; +import docca ; if ! [ type.registered IPP ] diff --git a/example/Jamfile b/example/Jamfile index 8b49d5fd44..001c382426 100644 --- a/example/Jamfile +++ b/example/Jamfile @@ -8,7 +8,8 @@ # import testing ; -import ../../config/checks/config : requires ; +import-search /boost/config/checks ; +import config : requires ; project /boost/beast/example : requirements @@ -22,6 +23,7 @@ project /boost/beast/example ] /boost/beast//lib-asio/static on:/boost/beast//lib-beast/static + .. ; build-project advanced ; diff --git a/example/advanced/server-flex-awaitable/Jamfile b/example/advanced/server-flex-awaitable/Jamfile index 3e211011fc..d10c6498b8 100644 --- a/example/advanced/server-flex-awaitable/Jamfile +++ b/example/advanced/server-flex-awaitable/Jamfile @@ -12,6 +12,7 @@ import ac ; project : requirements [ ac.check-library /boost/beast//lib-asio-ssl : /boost/beast//lib-asio-ssl/static : no ] + /boost/scope//boost_scope ; exe advanced-server-flex-awaitable : diff --git a/example/http/client/body/Jamfile b/example/http/client/body/Jamfile index 3b2f249cd6..9ee1b5efa6 100644 --- a/example/http/client/body/Jamfile +++ b/example/http/client/body/Jamfile @@ -11,4 +11,5 @@ exe json_client : json_client.cpp : coverage:no ubasan:no + /boost/json//boost_json ; diff --git a/test/Jamfile b/test/Jamfile index cfb2e2b832..e5e29f0a17 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -8,17 +8,8 @@ # import testing ; -import ../../config/checks/config : requires ; - -lib lib-test - : lib_test.cpp - : requirements - static - $(defines) - : usage-requirements - ./extras/include - $(defines) - ; +import-search /boost/config/checks ; +import config : requires ; project /boost/beast/test : requirements @@ -34,12 +25,21 @@ project /boost/beast/test darwin:Z_HAVE_UNISTD_H=1 /boost/beast//lib-asio/static on:/boost/beast//lib-beast/static - /boost/filesystem//boost_filesystem - /boost/context//boost_context + /boost/filesystem//boost_filesystem/static + /boost/context//boost_context/static norecover:ucontext norecover:BOOST_USE_ASAN=1 + .. ; +lib lib-test + : lib_test.cpp + : requirements + static + : usage-requirements + extras/include + ; + lib lib-zlib : extern/zlib-1.2.12/adler32.c extern/zlib-1.2.12/compress.c diff --git a/test/bench/parser/Jamfile b/test/bench/parser/Jamfile index 43629fc3f3..aeec92faa1 100644 --- a/test/bench/parser/Jamfile +++ b/test/bench/parser/Jamfile @@ -7,10 +7,11 @@ # Official repository: https://github.com/boostorg/beast # +project : requirements /boost/beast/test//lib-test ; + run nodejs_parser.cpp bench_parser.cpp - /boost/beast/test//lib-test : : : : bench-parser ; diff --git a/test/doc/Jamfile b/test/doc/Jamfile index 86ce518f00..f288898030 100644 --- a/test/doc/Jamfile +++ b/test/doc/Jamfile @@ -7,6 +7,10 @@ # Official repository: https://github.com/boostorg/beast # +project + : requirements + ../.. ; + local libs = /boost/beast//lib-asio-ssl /boost/beast/test//lib-test diff --git a/test/example/common/Jamfile b/test/example/common/Jamfile index 6ae40e5137..a454afced0 100644 --- a/test/example/common/Jamfile +++ b/test/example/common/Jamfile @@ -7,6 +7,10 @@ # Official repository: https://github.com/boostorg/beast # +project + : requirements + ../../.. ; + local SOURCES = root_certificates.cpp server_certificate.cpp