summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/beast/Jamfile
blob: 3bf7a422b0f150d53983e1e140e6fee14f49a559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#
# 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 feature ;
import boost ;
import modules ;
import testing ;
import ../config/checks/config : requires ;

boost.use-project ;

lib socket ; # SOLARIS, QNXNTO
lib nsl ; # SOLARIS
lib ws2_32 ; # NT
lib mswsock ; # NT
lib ipv6 ; # HPUX
lib network ; # HAIKU

lib ssl ;
lib crypto ;
lib crypt32 ;

lib ssl : : <target-os>windows <name>ssleay32 ;
lib crypto : : <target-os>windows <name>libeay32 ;

feature.feature boost.beast.allow-deprecated : on off : propagated composite ;
feature.compose <boost.beast.allow-deprecated>on : <define>BOOST_BEAST_ALLOW_DEPRECATED ;

feature.feature boost.beast.separate-compilation : on off : propagated composite ;
feature.compose <boost.beast.separate-compilation>on : <define>BOOST_BEAST_SEPARATE_COMPILATION ;

variant beast_coverage
  : debug
  : <cxxflags>"-msse4.2 --coverage"
    <linkflags>"--coverage"
  ;

variant beast_valgrind
  : release
  : <valgrind>on # Boost.Context uses this property
  ;

variant beast_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 ;

project /boost/beast ;

local defines =
    [ requires
    cxx11_constexpr
    cxx11_decltype
    cxx11_hdr_tuple
    cxx11_template_aliases
    cxx11_variadic_templates
    ]
    <implicit-dependency>/boost//headers
    <include>.
    <define>BOOST_ALL_NO_LIB=1
    <define>BOOST_ASIO_SEPARATE_COMPILATION
    <define>BOOST_ASIO_NO_DEPRECATED=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_COROUTINES_NO_DEPRECATION_WARNING=1
    <toolset>msvc:<cxxflags>"/bigobj"
    <toolset>msvc-14.1:<cxxflags>"/permissive-"
    <toolset>msvc-14.2:<cxxflags>"/permissive-"
    <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
    <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
    <toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
    <toolset>msvc:<define>_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING
    <toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot"
    <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
    <target-os>windows:<define>_WIN32_WINNT=0x0601
    <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
    ;

lib lib-asio
    : test/lib_asio.cpp
    : requirements
        <link>static
        $(defines)
    : usage-requirements
        $(defines)
    ;

lib lib-asio-ssl
    : test/lib_asio_ssl.cpp
    : requirements
        <link>static
        $(defines)
        [ 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 ]
    : usage-requirements
        $(defines)
    ;

lib lib-beast
    : test/lib_beast.cpp
    : requirements
    <link>static
    $(defines)
    : usage-requirements
    $(defines)
    ;