mirror of
https://github.com/boostorg/beast.git
synced 2026-02-03 22:06:16 +01:00
fix #1293 * Build ASIO's non-template entities into a static library to reduce the compiler's memory usage during test compilation. * Retry as single-threaded build after the first build failure.
120 lines
2.9 KiB
Plaintext
120 lines
2.9 KiB
Plaintext
#
|
|
# Copyright (c) 2013-2017 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 os ;
|
|
import feature ;
|
|
import boost ;
|
|
import modules ;
|
|
import testing ;
|
|
import ../../config/checks/config : requires ;
|
|
|
|
boost.use-project ;
|
|
|
|
if [ os.name ] = SOLARIS
|
|
{
|
|
lib socket ;
|
|
lib nsl ;
|
|
}
|
|
else if [ os.name ] = NT
|
|
{
|
|
lib ws2_32 ;
|
|
lib mswsock ;
|
|
}
|
|
else if [ os.name ] = HPUX
|
|
{
|
|
lib ipv6 ;
|
|
}
|
|
else if [ os.name ] = QNXNTO
|
|
{
|
|
lib socket ;
|
|
}
|
|
else if [ os.name ] = HAIKU
|
|
{
|
|
lib network ;
|
|
}
|
|
|
|
if [ os.name ] = NT
|
|
{
|
|
lib ssl : : <name>ssleay32 ;
|
|
lib crypto : : <name>libeay32 ;
|
|
}
|
|
else
|
|
{
|
|
lib ssl ;
|
|
lib crypto ;
|
|
}
|
|
|
|
variant coverage
|
|
: debug
|
|
: <cxxflags>"-msse4.2 --coverage"
|
|
<linkflags>"--coverage"
|
|
;
|
|
|
|
variant valgrind
|
|
: release
|
|
: <valgrind>on # Boost.Context uses this property
|
|
;
|
|
|
|
variant ubasan
|
|
: release
|
|
: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp"
|
|
<linkflags>"-fsanitize=address,undefined"
|
|
<define>BOOST_USE_ASAN=1
|
|
;
|
|
|
|
path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;
|
|
|
|
lib static_asio
|
|
: test/asio.cpp
|
|
: requirements
|
|
[ requires
|
|
cxx11_constexpr
|
|
cxx11_decltype
|
|
cxx11_hdr_tuple
|
|
cxx11_template_aliases
|
|
cxx11_variadic_templates
|
|
]
|
|
<define>BOOST_ASIO_SEPARATE_COMPILATION
|
|
<link>static
|
|
;
|
|
|
|
project /boost/beast
|
|
: requirements
|
|
<implicit-dependency>/boost//headers
|
|
<include>.
|
|
<include>./test/extras/include
|
|
<library>/boost/system//boost_system
|
|
<library>/boost/coroutine//boost_coroutine
|
|
<library>/boost/filesystem//boost_filesystem
|
|
<library>static_asio
|
|
<threading>multi
|
|
<runtime-link>shared
|
|
<debug-symbols>on
|
|
<define>BOOST_ALL_NO_LIB=1
|
|
<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
|
|
#<define>BOOST_ASIO_NO_DEPRECATED=1 # some tests use deprecated strand
|
|
<define>BOOST_COROUTINES_NO_DEPRECATION_WARNING=1
|
|
<toolset>msvc:<cxxflags>"/bigobj /permissive-"
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
|
|
<toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot"
|
|
<os>SOLARIS:<library>socket
|
|
<os>SOLARIS:<library>nsl
|
|
<os>NT:<define>_WIN32_WINNT=0x0601
|
|
<os>NT,<toolset>cw:<library>ws2_32
|
|
<os>NT,<toolset>cw:<library>mswsock
|
|
<os>NT,<toolset>gcc:<library>ws2_32
|
|
<os>NT,<toolset>gcc:<library>mswsock
|
|
<os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
|
|
: usage-requirements
|
|
;
|