Skip to content

Commit 69c457a

Browse files
authored
Add support for modular build structure
1 parent 00bc812 commit 69c457a

File tree

5 files changed

+49
-7
lines changed

5 files changed

+49
-7
lines changed

build.jam

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright René Ferdinand Rivera Morell 2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/asio//boost_asio
10+
/boost/assert//boost_assert
11+
/boost/charconv//boost_charconv
12+
/boost/config//boost_config
13+
/boost/core//boost_core
14+
/boost/describe//boost_describe
15+
/boost/endian//boost_endian
16+
/boost/intrusive//boost_intrusive
17+
/boost/mp11//boost_mp11
18+
/boost/optional//boost_optional
19+
/boost/pfr//boost_pfr
20+
/boost/system//boost_system
21+
/boost/throw_exception//boost_throw_exception
22+
/boost/variant2//boost_variant2 ;
23+
24+
project /boost/mysql
25+
: common-requirements
26+
<include>include
27+
;
28+
29+
explicit
30+
[ alias boost_mysql : : : : <library>$(boost_dependencies) ]
31+
[ alias all : boost_mysql example test ]
32+
;
33+
34+
call-if : boost-library mysql
35+
;
36+

doc/Jamfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ project mysql/doc ;
1010

1111
import boostbook ;
1212
import os ;
13-
import ../../../tools/docca/docca.jam ;
13+
import-search /boost/docca ;
14+
import docca ;
1415

1516

1617
# Note: adding server-specific error codes and collations to the reference

example/Jamfile

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import os ;
99

10+
project : requirements <library>/boost/mysql//boost_mysql ;
11+
1012
path-constant this_dir : . ;
1113

1214
# The hostname to use for examples
@@ -110,6 +112,7 @@ run
110112
/boost/mysql/test//boost_context_lib
111113
/boost/json//boost_json
112114
/boost/url//boost_url
115+
/boost/beast//boost_beast
113116
: requirements
114117
<testing.launcher>"python $(this_dir)/private/run_connection_pool.py"
115118
<testing.arg>$(hostname)

test/Jamfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66
#
77

8+
require-b2 5.0.1 ;
9+
import-search /boost/config/checks ;
10+
811
import os ;
912
import path ;
1013
import feature ;
1114
import ac ;
1215
import indirect ;
13-
import ../config/checks/config : requires ;
16+
import config : requires ;
1417

15-
project /boost/mysql/test ;
18+
project : requirements <library>/boost/mysql//boost_mysql ;
1619

1720
# Support header-only builds
1821
feature.feature boost.mysql.separate-compilation : on off : propagated composite ;
@@ -43,7 +46,7 @@ alias fail_if_no_openssl
4346
explicit fail_if_no_openssl ;
4447

4548
# Requirements to use across targets
46-
local requirements =
49+
local requirements =
4750
<define>BOOST_ALL_NO_LIB=1
4851
<define>BOOST_ASIO_NO_DEPRECATED=1
4952
<define>BOOST_ASIO_DISABLE_BOOST_ARRAY=1
@@ -53,7 +56,7 @@ local requirements =
5356
<define>BOOST_ASIO_DISABLE_BOOST_COROUTINE=1
5457
<define>BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS=1
5558
<define>BOOST_ALLOW_DEPRECATED_HEADERS=1
56-
# Disable warning C4702: unreachable code, produced by Boost.Asio buffer.hpp
59+
# Disable warning C4702: unreachable code, produced by Boost.Asio buffer.hpp
5760
<toolset>msvc:<cxxflags>"/bigobj /wd4702 /permissive-"
5861
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
5962
<toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
@@ -68,7 +71,6 @@ local requirements =
6871
<target-os>linux:<define>_XOPEN_SOURCE=600
6972
<target-os>linux:<define>_GNU_SOURCE=1
7073
<target-os>windows:<define>_WIN32_WINNT=0x0601
71-
<include>../include
7274
<boost.mysql.use-ts-executor>on:<define>BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
7375
# Disable assertions when doing coverage, as they distort coverage data
7476
<coverage>on:<define>BOOST_DISABLE_ASSERTS

test/unit/Jamfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ run
136136
test/pfr.cpp
137137
test/pipeline.cpp
138138
test/with_diagnostics.cpp
139-
139+
140140
: requirements
141141
<include>include
142142
: target-name boost_mysql_unittests

0 commit comments

Comments
 (0)