]>
Commit | Line | Data |
---|---|---|
b32b8144 | 1 | # |
92f5a8d4 | 2 | # Copyright (c) 2019 Vinnie Falco (vinnie dot falco at gmail dot com) |
b32b8144 FG |
3 | # |
4 | # Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | # | |
7 | # Official repository: https://github.com/boostorg/beast | |
8 | # | |
9 | ||
92f5a8d4 | 10 | import ac ; |
b32b8144 FG |
11 | import os ; |
12 | import feature ; | |
13 | import boost ; | |
14 | import modules ; | |
15 | import testing ; | |
f67539c2 | 16 | import ../config/checks/config : requires ; |
b32b8144 FG |
17 | |
18 | boost.use-project ; | |
19 | ||
92f5a8d4 TL |
20 | lib socket ; # SOLARIS, QNXNTO |
21 | lib nsl ; # SOLARIS | |
22 | lib ws2_32 ; # NT | |
23 | lib mswsock ; # NT | |
24 | lib ipv6 ; # HPUX | |
25 | lib network ; # HAIKU | |
26 | ||
27 | lib ssl ; | |
28 | lib crypto ; | |
29 | lib crypt32 ; | |
30 | ||
31 | lib ssl : : <target-os>windows <name>ssleay32 ; | |
32 | lib crypto : : <target-os>windows <name>libeay32 ; | |
33 | ||
34 | feature.feature boost.beast.allow-deprecated : on off : propagated composite ; | |
35 | feature.compose <boost.beast.allow-deprecated>on : <define>BOOST_BEAST_ALLOW_DEPRECATED ; | |
36 | ||
37 | feature.feature boost.beast.separate-compilation : on off : propagated composite ; | |
38 | feature.compose <boost.beast.separate-compilation>on : <define>BOOST_BEAST_SEPARATE_COMPILATION ; | |
39 | ||
40 | variant beast_coverage | |
b32b8144 FG |
41 | : debug |
42 | : <cxxflags>"-msse4.2 --coverage" | |
43 | <linkflags>"--coverage" | |
44 | ; | |
45 | ||
92f5a8d4 | 46 | variant beast_valgrind |
b32b8144 FG |
47 | : release |
48 | : <valgrind>on # Boost.Context uses this property | |
49 | ; | |
50 | ||
92f5a8d4 | 51 | variant beast_ubasan |
b32b8144 | 52 | : release |
11fdf7f2 | 53 | : <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp" |
b32b8144 FG |
54 | <linkflags>"-fsanitize=address,undefined" |
55 | <define>BOOST_USE_ASAN=1 | |
56 | ; | |
57 | ||
92f5a8d4 | 58 | path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ; |
b32b8144 | 59 | |
92f5a8d4 TL |
60 | project /boost/beast ; |
61 | ||
62 | local defines = | |
63 | [ requires | |
64 | cxx11_constexpr | |
65 | cxx11_decltype | |
66 | cxx11_hdr_tuple | |
67 | cxx11_template_aliases | |
68 | cxx11_variadic_templates | |
69 | ] | |
b32b8144 FG |
70 | <implicit-dependency>/boost//headers |
71 | <include>. | |
b32b8144 | 72 | <define>BOOST_ALL_NO_LIB=1 |
92f5a8d4 TL |
73 | <define>BOOST_ASIO_SEPARATE_COMPILATION |
74 | <define>BOOST_ASIO_NO_DEPRECATED=1 | |
b32b8144 FG |
75 | <define>BOOST_ASIO_DISABLE_BOOST_ARRAY=1 |
76 | <define>BOOST_ASIO_DISABLE_BOOST_BIND=1 | |
77 | <define>BOOST_ASIO_DISABLE_BOOST_DATE_TIME=1 | |
78 | <define>BOOST_ASIO_DISABLE_BOOST_REGEX=1 | |
b32b8144 FG |
79 | <define>BOOST_COROUTINES_NO_DEPRECATION_WARNING=1 |
80 | <toolset>msvc:<cxxflags>"/bigobj" | |
92f5a8d4 TL |
81 | <toolset>msvc-14.1:<cxxflags>"/permissive-" |
82 | <toolset>msvc-14.2:<cxxflags>"/permissive-" | |
b32b8144 FG |
83 | <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1 |
84 | <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1 | |
92f5a8d4 TL |
85 | <toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING |
86 | <toolset>msvc:<define>_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING | |
87 | <toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot" | |
88 | <target-os>linux:<define>_XOPEN_SOURCE=600 | |
89 | <target-os>linux:<define>_GNU_SOURCE=1 | |
90 | <target-os>solaris:<define>_XOPEN_SOURCE=500 | |
91 | <target-os>solaris:<define>__EXTENSIONS__ | |
92 | <target-os>solaris:<library>socket | |
93 | <target-os>solaris:<library>nsl | |
94 | <target-os>windows:<define>_WIN32_WINNT=0x0601 | |
95 | <target-os>windows,<toolset>gcc:<library>ws2_32 | |
96 | <target-os>windows,<toolset>gcc:<library>mswsock | |
97 | <target-os>windows,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS | |
98 | <target-os>hpux,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED | |
99 | <target-os>hpux:<library>ipv6 | |
100 | <target-os>qnxnto:<library>socket | |
101 | <target-os>haiku:<library>network | |
102 | ; | |
103 | ||
104 | lib lib-asio | |
105 | : test/lib_asio.cpp | |
106 | : requirements | |
107 | <link>static | |
108 | $(defines) | |
109 | : usage-requirements | |
110 | $(defines) | |
111 | ; | |
112 | ||
113 | lib lib-asio-ssl | |
114 | : test/lib_asio_ssl.cpp | |
115 | : requirements | |
116 | <link>static | |
117 | $(defines) | |
118 | [ ac.check-library /boost/beast//ssl : <library>/boost/beast//ssl/<link>shared : <build>no ] | |
119 | [ ac.check-library /boost/beast//crypto : <library>/boost/beast//crypto/<link>shared : <build>no ] | |
120 | : usage-requirements | |
121 | $(defines) | |
122 | ; | |
123 | ||
124 | lib lib-beast | |
125 | : test/lib_beast.cpp | |
126 | : requirements | |
127 | <link>static | |
128 | $(defines) | |
129 | : usage-requirements | |
130 | $(defines) | |
131 | ; |