2017-07-20 08:01:46 -07:00
|
|
|
#
|
2019-01-10 20:25:10 -08:00
|
|
|
# Copyright (c) 2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
2017-07-20 08:01:46 -07:00
|
|
|
#
|
|
|
|
|
# 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)
|
|
|
|
|
#
|
2017-07-20 13:40:34 -07:00
|
|
|
# Official repository: https://github.com/boostorg/beast
|
|
|
|
|
#
|
2017-07-20 08:01:46 -07:00
|
|
|
|
2019-01-10 20:25:10 -08:00
|
|
|
import ac ;
|
2017-07-20 08:01:46 -07:00
|
|
|
import os ;
|
2020-07-14 16:15:41 +00:00
|
|
|
import path ;
|
2017-07-20 08:01:46 -07:00
|
|
|
import feature ;
|
|
|
|
|
import boost ;
|
2017-04-20 10:30:24 -07:00
|
|
|
import modules ;
|
|
|
|
|
import testing ;
|
2019-12-18 18:53:50 +02:00
|
|
|
import ../config/checks/config : requires ;
|
2017-07-20 08:01:46 -07:00
|
|
|
|
|
|
|
|
boost.use-project ;
|
|
|
|
|
|
2019-01-10 20:25:10 -08:00
|
|
|
lib socket ; # SOLARIS, QNXNTO
|
|
|
|
|
lib nsl ; # SOLARIS
|
|
|
|
|
lib ws2_32 ; # NT
|
|
|
|
|
lib mswsock ; # NT
|
|
|
|
|
lib ipv6 ; # HPUX
|
|
|
|
|
lib network ; # HAIKU
|
2017-07-20 08:01:46 -07:00
|
|
|
|
2019-01-10 20:25:10 -08:00
|
|
|
lib ssl ;
|
|
|
|
|
lib crypto ;
|
|
|
|
|
lib crypt32 ;
|
|
|
|
|
|
2020-07-14 16:15:41 +00:00
|
|
|
# Microsoft Windows section. Refer to FAQ "Windows and OpenSSL"
|
|
|
|
|
if [ os.name ] = NT
|
|
|
|
|
{
|
|
|
|
|
local OPENSSL_ROOT_DEFAULT = "C:/OpenSSL" ;
|
|
|
|
|
local OPENSSL_ROOT_ENV = [ os.environ OPENSSL_ROOT ] ;
|
|
|
|
|
local OPENSSL_ROOT = "" ;
|
|
|
|
|
if $(OPENSSL_ROOT_ENV)
|
|
|
|
|
{
|
|
|
|
|
OPENSSL_ROOT = $(OPENSSL_ROOT_ENV) ;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
OPENSSL_ROOT = $(OPENSSL_ROOT_DEFAULT) ;
|
|
|
|
|
}
|
|
|
|
|
project
|
|
|
|
|
: requirements
|
|
|
|
|
<include>$(OPENSSL_ROOT)/include
|
|
|
|
|
<variant>debug:<library-path>$(OPENSSL_ROOT)/lib
|
|
|
|
|
<target-os>windows<variant>debug:<library-path>$(OPENSSL_ROOT)/debug/lib
|
|
|
|
|
<variant>release:<library-path>$(OPENSSL_ROOT)/lib
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
if [ path.exists $(OPENSSL_ROOT)/lib/libssl.lib ]
|
|
|
|
|
{
|
|
|
|
|
echo "OpenSSL > 1.1.0. Including libssl" ;
|
|
|
|
|
lib ssl : : <target-os>windows <name>libssl ;
|
|
|
|
|
}
|
|
|
|
|
if [ path.exists $(OPENSSL_ROOT)/lib/libcrypto.lib ]
|
|
|
|
|
{
|
|
|
|
|
echo "OpenSSL > 1.1.0. Including libcrypto" ;
|
|
|
|
|
lib crypto : : <target-os>windows <name>libcrypto ;
|
|
|
|
|
}
|
|
|
|
|
if [ path.exists $(OPENSSL_ROOT)/lib/ssleay32.lib ]
|
|
|
|
|
{
|
|
|
|
|
echo "OpenSSL < 1.1.0. Including ssleay32" ;
|
|
|
|
|
lib ssl : : <target-os>windows <name>ssleay32 ;
|
|
|
|
|
}
|
|
|
|
|
if [ path.exists $(OPENSSL_ROOT)/lib/libeay32.lib ]
|
|
|
|
|
{
|
|
|
|
|
echo "OpenSSL < 1.1.0. Including libeay32" ;
|
|
|
|
|
lib crypto : : <target-os>windows <name>libeay32 ;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-20 08:01:46 -07:00
|
|
|
|
2019-05-31 01:57:02 +02:00
|
|
|
feature.feature boost.beast.allow-deprecated : on off : propagated composite ;
|
2019-05-26 17:09:08 +02:00
|
|
|
feature.compose <boost.beast.allow-deprecated>on : <define>BOOST_BEAST_ALLOW_DEPRECATED ;
|
|
|
|
|
|
2019-05-31 01:57:02 +02:00
|
|
|
feature.feature boost.beast.separate-compilation : on off : propagated composite ;
|
2019-05-26 17:09:08 +02:00
|
|
|
feature.compose <boost.beast.separate-compilation>on : <define>BOOST_BEAST_SEPARATE_COMPILATION ;
|
|
|
|
|
|
2019-02-19 09:58:06 -08:00
|
|
|
variant beast_coverage
|
2017-08-10 17:44:21 -07:00
|
|
|
: debug
|
|
|
|
|
: <cxxflags>"-msse4.2 --coverage"
|
2017-07-20 13:40:34 -07:00
|
|
|
<linkflags>"--coverage"
|
2017-08-10 17:44:21 -07:00
|
|
|
;
|
2016-04-27 14:58:07 +07:00
|
|
|
|
2019-02-19 09:58:06 -08:00
|
|
|
variant beast_valgrind
|
2017-08-10 17:44:21 -07:00
|
|
|
: release
|
|
|
|
|
: <valgrind>on # Boost.Context uses this property
|
|
|
|
|
;
|
2017-07-31 09:34:22 -07:00
|
|
|
|
2019-02-19 09:58:06 -08:00
|
|
|
variant beast_ubasan
|
2017-08-10 17:44:21 -07:00
|
|
|
: release
|
2017-12-21 13:10:17 -08:00
|
|
|
: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp"
|
2017-05-09 19:36:01 -07:00
|
|
|
<linkflags>"-fsanitize=address,undefined"
|
2017-08-01 20:15:07 -07:00
|
|
|
<define>BOOST_USE_ASAN=1
|
2017-08-10 17:44:21 -07:00
|
|
|
;
|
2017-07-25 19:46:53 -07:00
|
|
|
|
2018-11-11 14:07:55 -08:00
|
|
|
path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;
|
2017-07-28 13:24:39 -07:00
|
|
|
|
2019-03-22 09:32:22 -07:00
|
|
|
project /boost/beast ;
|
|
|
|
|
|
|
|
|
|
local defines =
|
2019-03-20 19:07:09 +01:00
|
|
|
[ requires
|
|
|
|
|
cxx11_constexpr
|
|
|
|
|
cxx11_decltype
|
|
|
|
|
cxx11_hdr_tuple
|
|
|
|
|
cxx11_template_aliases
|
|
|
|
|
cxx11_variadic_templates
|
|
|
|
|
]
|
2019-01-10 20:25:10 -08:00
|
|
|
<implicit-dependency>/boost//headers
|
2019-03-22 09:32:22 -07:00
|
|
|
<include>.
|
2017-08-10 17:44:21 -07:00
|
|
|
<define>BOOST_ALL_NO_LIB=1
|
2019-02-23 06:55:12 -08:00
|
|
|
<define>BOOST_ASIO_SEPARATE_COMPILATION
|
2018-11-22 20:49:30 -08:00
|
|
|
<define>BOOST_ASIO_NO_DEPRECATED=1
|
2017-07-20 13:40:34 -07:00
|
|
|
<define>BOOST_ASIO_DISABLE_BOOST_ARRAY=1
|
|
|
|
|
<define>BOOST_ASIO_DISABLE_BOOST_BIND=1
|
|
|
|
|
<define>BOOST_ASIO_DISABLE_BOOST_DATE_TIME=1
|
|
|
|
|
<define>BOOST_ASIO_DISABLE_BOOST_REGEX=1
|
2017-08-10 17:44:21 -07:00
|
|
|
<define>BOOST_COROUTINES_NO_DEPRECATION_WARNING=1
|
2018-12-13 16:43:17 -08:00
|
|
|
<toolset>msvc:<cxxflags>"/bigobj"
|
|
|
|
|
<toolset>msvc-14.1:<cxxflags>"/permissive-"
|
2019-03-02 10:51:44 -08:00
|
|
|
<toolset>msvc-14.2:<cxxflags>"/permissive-"
|
2016-04-27 14:58:07 +07:00
|
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
|
|
|
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
|
2018-11-22 20:49:30 -08:00
|
|
|
<toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
|
|
|
|
|
<toolset>msvc:<define>_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING
|
2018-05-04 19:00:10 -07:00
|
|
|
<toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot"
|
2019-01-10 20:25:10 -08:00
|
|
|
<target-os>linux:<define>_XOPEN_SOURCE=600
|
|
|
|
|
<target-os>linux:<define>_GNU_SOURCE=1
|
|
|
|
|
<target-os>solaris:<define>_XOPEN_SOURCE=500
|
|
|
|
|
<target-os>solaris:<define>__EXTENSIONS__
|
|
|
|
|
<target-os>solaris:<library>socket
|
|
|
|
|
<target-os>solaris:<library>nsl
|
2019-02-22 04:58:26 -08:00
|
|
|
<target-os>windows:<define>_WIN32_WINNT=0x0601
|
2019-01-10 20:25:10 -08:00
|
|
|
<target-os>windows,<toolset>gcc:<library>ws2_32
|
|
|
|
|
<target-os>windows,<toolset>gcc:<library>mswsock
|
|
|
|
|
<target-os>windows,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
|
|
|
|
|
<target-os>hpux,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
|
|
|
|
|
<target-os>hpux:<library>ipv6
|
|
|
|
|
<target-os>qnxnto:<library>socket
|
|
|
|
|
<target-os>haiku:<library>network
|
2019-03-22 09:32:22 -07:00
|
|
|
;
|
2019-02-22 13:06:43 -08:00
|
|
|
|
2019-03-24 08:01:37 -07:00
|
|
|
lib lib-asio
|
|
|
|
|
: test/lib_asio.cpp
|
2019-03-22 09:32:22 -07:00
|
|
|
: requirements
|
2019-03-24 08:01:37 -07:00
|
|
|
<link>static
|
|
|
|
|
$(defines)
|
2019-03-22 09:32:22 -07:00
|
|
|
: usage-requirements
|
2019-03-24 08:01:37 -07:00
|
|
|
$(defines)
|
2019-03-20 19:07:09 +01:00
|
|
|
;
|
|
|
|
|
|
2019-03-24 08:01:37 -07:00
|
|
|
lib lib-asio-ssl
|
|
|
|
|
: test/lib_asio_ssl.cpp
|
2019-03-20 19:07:09 +01:00
|
|
|
: requirements
|
2019-03-24 08:01:37 -07:00
|
|
|
<link>static
|
|
|
|
|
$(defines)
|
2019-03-20 19:07:09 +01:00
|
|
|
[ ac.check-library /boost/beast//ssl : <library>/boost/beast//ssl/<link>shared : <build>no ]
|
|
|
|
|
[ ac.check-library /boost/beast//crypto : <library>/boost/beast//crypto/<link>shared : <build>no ]
|
2019-03-22 09:32:22 -07:00
|
|
|
: usage-requirements
|
2019-03-24 08:01:37 -07:00
|
|
|
$(defines)
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
lib lib-beast
|
|
|
|
|
: test/lib_beast.cpp
|
|
|
|
|
: requirements
|
|
|
|
|
<link>static
|
|
|
|
|
$(defines)
|
|
|
|
|
: usage-requirements
|
|
|
|
|
$(defines)
|
2019-03-20 19:07:09 +01:00
|
|
|
;
|