From 717b2abe09f43735580f7ef9506a72c8fc6757be Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/10] Make the library modular usable. --- build.jam | 32 +++++++++++++++++++++++ example/Jamfile | 1 + test/Jamfile | 69 ++++++++----------------------------------------- 3 files changed, 44 insertions(+), 58 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..9492cee9f --- /dev/null +++ b/build.jam @@ -0,0 +1,32 @@ +# Copyright René Ferdinand Rivera Morell 2024 +# 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) + +import project ; + +project /boost/mysql + : common-requirements + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/describe//boost_describe + /boost/endian//boost_endian + /boost/intrusive//boost_intrusive + /boost/lexical_cast//boost_lexical_cast + /boost/mp11//boost_mp11 + /boost/optional//boost_optional + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/variant2//boost_variant2 + include + ; + +explicit + [ alias boost_mysql ] + [ alias all : boost_mysql example test ] + ; + +call-if : boost-library mysql + ; diff --git a/example/Jamfile b/example/Jamfile index 2df69954a..893ac05a1 100644 --- a/example/Jamfile +++ b/example/Jamfile @@ -107,6 +107,7 @@ run /boost/mysql/test//boost_context_lib /boost/json//boost_json /boost/url//boost_url + /boost/beast//boost_beast : requirements "python $(this_dir)/private/run_connection_pool.py" $(hostname) diff --git a/test/Jamfile b/test/Jamfile index 065631577..8df78d2a6 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -5,12 +5,15 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # +require-b2 5.0.1 ; +import-search /boost/config/checks ; + import os ; import path ; import feature ; -import ../config/checks/config : requires ; +import config : requires ; -project /boost/mysql/test ; +project ; # Support header-only builds feature.feature boost.mysql.separate-compilation : on off : propagated composite ; @@ -19,63 +22,14 @@ feature.feature boost.mysql.separate-compilation : on off : propagated composite feature.feature boost.mysql.use-ts-executor : on off : propagated composite ; # System libraries -if [ os.name ] = NT -{ - local OPENSSL_ROOT_ENV = [ os.environ OPENSSL_ROOT ] ; - local OPENSSL_ROOT = "" ; - if $(OPENSSL_ROOT_ENV) - { - OPENSSL_ROOT = $(OPENSSL_ROOT_ENV) ; - } - else - { - OPENSSL_ROOT = "C:/OpenSSL" ; - } - local openssl_requirements = - $(OPENSSL_ROOT)/include - $(OPENSSL_ROOT)/lib - ; - - if [ path.exists $(OPENSSL_ROOT)/lib/libssl.lib ] - { - echo "OpenSSL > 1.1.0. Including libssl" ; - lib ssl : : windows libssl : : $(openssl_requirements) ; - } - else if [ path.exists $(OPENSSL_ROOT)/lib/ssleay32.lib ] - { - echo "OpenSSL < 1.1.0. Including ssleay32" ; - lib ssl : : windows ssleay32 : : $(openssl_requirements) ; - } - else - { - lib ssl : : shared : : $(openssl_requirements) ; - } - - if [ path.exists $(OPENSSL_ROOT)/lib/libcrypto.lib ] - { - echo "OpenSSL > 1.1.0. Including libcrypto" ; - lib crypto : : windows libcrypto : : $(openssl_requirements) ; - } - else if [ path.exists $(OPENSSL_ROOT)/lib/libeay32.lib ] - { - echo "OpenSSL < 1.1.0. Including libeay32" ; - lib crypto : : windows libeay32 : : $(openssl_requirements) ; - } - else - { - lib crypto : : shared : : $(openssl_requirements) ; - } -} -else +local OPENSSL_ROOT = [ os.environ OPENSSL_ROOT ] ; +if [ os.on-windows ] { - local OPENSSL_ROOT = [ os.environ OPENSSL_ROOT ] ; - local openssl_requirements = - $(OPENSSL_ROOT)/include - $(OPENSSL_ROOT)/lib - ; - lib ssl : : shared : : $(openssl_requirements) ; - lib crypto : : shared : : $(openssl_requirements) ; + OPENSSL_ROOT ?= "C:/OpenSSL" ; } +using openssl : : $(OPENSSL_ROOT)/lib $(OPENSSL_ROOT)/include ; +alias ssl : : /openssl//ssl/shared ; +alias crypto : : /openssl//crypto/shared ; # Requirements to use across targets local requirements = @@ -101,7 +55,6 @@ local requirements = linux:_GNU_SOURCE=1 windows:_WIN32_WINNT=0x0601 BOOST_ASIO_SEPARATE_COMPILATION - ../include on:BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT ; From 09d36a631741bb96051811478a8cffc2d46fc6ab Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 18 Mar 2024 20:45:47 -0500 Subject: [PATCH 02/10] Be verbose on what submods we fetch. --- tools/ci/ci_util/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/ci_util/common.py b/tools/ci/ci_util/common.py index e7c40615a..25bbaea41 100644 --- a/tools/ci/ci_util/common.py +++ b/tools/ci/ci_util/common.py @@ -83,7 +83,7 @@ def remove_readonly(func, path, _): for subm in submodules: run(["git", "submodule", "update", "-q", "--init", subm]) if install_type == BoostInstallType.mysql: - run(["python", "tools/boostdep/depinst/depinst.py", "--include", "example", "mysql"]) + run(["python", "tools/boostdep/depinst/depinst.py", "--verbose", "--include", "example", "mysql"]) else: run(['python', 'tools/boostdep/depinst/depinst.py', '../tools/quickbook']) From f81755876274bac8e0f82d2568734aa4a6d9e3ca Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 03/10] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.jam b/build.jam index 9492cee9f..f107bb2de 100644 --- a/build.jam +++ b/build.jam @@ -7,19 +7,19 @@ import project ; project /boost/mysql : common-requirements - /boost/asio//boost_asio - /boost/assert//boost_assert - /boost/config//boost_config - /boost/core//boost_core - /boost/describe//boost_describe - /boost/endian//boost_endian - /boost/intrusive//boost_intrusive - /boost/lexical_cast//boost_lexical_cast - /boost/mp11//boost_mp11 - /boost/optional//boost_optional - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/variant2//boost_variant2 + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/describe//boost_describe + /boost/endian//boost_endian + /boost/intrusive//boost_intrusive + /boost/lexical_cast//boost_lexical_cast + /boost/mp11//boost_mp11 + /boost/optional//boost_optional + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/variant2//boost_variant2 include ; From 0b01df4de881dc1b69e2b2bf03c98212ab6d417b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 26 Apr 2024 22:16:10 -0500 Subject: [PATCH 04/10] Replace relative docca refs with project based. --- doc/Jamfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Jamfile b/doc/Jamfile index dde62b4ba..d5eeb1b75 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -10,7 +10,8 @@ project mysql/doc ; import boostbook ; import os ; -import ../../../tools/docca/docca.jam ; +import-search /boost/docca ; +import docca ; # Note: adding server-specific error codes and collations to the reference From 3dff2fa3dc11a9ab97d3728897d58a28845c61c8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 29 Apr 2024 13:11:16 -0500 Subject: [PATCH 05/10] Update library dependencies. --- build.jam | 3 ++- test/unit/Jamfile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.jam b/build.jam index f107bb2de..07ad16def 100644 --- a/build.jam +++ b/build.jam @@ -9,14 +9,15 @@ project /boost/mysql : common-requirements /boost/asio//boost_asio /boost/assert//boost_assert + /boost/charconv//boost_charconv /boost/config//boost_config /boost/core//boost_core /boost/describe//boost_describe /boost/endian//boost_endian /boost/intrusive//boost_intrusive - /boost/lexical_cast//boost_lexical_cast /boost/mp11//boost_mp11 /boost/optional//boost_optional + /boost/pfr//boost_pfr /boost/system//boost_system /boost/throw_exception//boost_throw_exception /boost/variant2//boost_variant2 diff --git a/test/unit/Jamfile b/test/unit/Jamfile index f5f7f8f6b..9e2d8a488 100644 --- a/test/unit/Jamfile +++ b/test/unit/Jamfile @@ -122,7 +122,7 @@ run test/escape_string.cpp test/constant_string_view.cpp test/pfr.cpp - + : requirements include : target-name boost_mysql_unittests From 32f77721ae481c3e58a1cfffbda777199103e5bd Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 06/10] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index 07ad16def..b892d2a93 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import project ; project /boost/mysql From a3cdc547e4f120ef6a9b4519c603cd5c1a33c95c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 07/10] Bump B2 require to 5.2 --- build.jam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index b892d2a93..52999cbb3 100644 --- a/build.jam +++ b/build.jam @@ -3,9 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; - -import project ; +require-b2 5.2 ; project /boost/mysql : common-requirements From c5cd12f8f4138e60831774f8ccd77462f8f1ebbd Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:24 -0500 Subject: [PATCH 08/10] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/build.jam b/build.jam index 52999cbb3..a3bb20e1e 100644 --- a/build.jam +++ b/build.jam @@ -5,29 +5,32 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/charconv//boost_charconv + /boost/config//boost_config + /boost/core//boost_core + /boost/describe//boost_describe + /boost/endian//boost_endian + /boost/intrusive//boost_intrusive + /boost/mp11//boost_mp11 + /boost/optional//boost_optional + /boost/pfr//boost_pfr + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/variant2//boost_variant2 ; + project /boost/mysql : common-requirements - /boost/asio//boost_asio - /boost/assert//boost_assert - /boost/charconv//boost_charconv - /boost/config//boost_config - /boost/core//boost_core - /boost/describe//boost_describe - /boost/endian//boost_endian - /boost/intrusive//boost_intrusive - /boost/mp11//boost_mp11 - /boost/optional//boost_optional - /boost/pfr//boost_pfr - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/variant2//boost_variant2 include ; explicit - [ alias boost_mysql ] + [ alias boost_mysql : : : : $(boost_dependencies) ] [ alias all : boost_mysql example test ] ; call-if : boost-library mysql ; + From e3ff58ebbd811cef68c12b6948e743c0bfd08726 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:49:13 -0500 Subject: [PATCH 09/10] Remove mis-merge openssl. And remove not needed define. --- test/Jamfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index b43e2aee4..4cf6ca1b0 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -34,9 +34,6 @@ rule do_fail_impl ( a * ) { exit "OpenSSL could not be found. Don't build target fail_if_no_openssl to skip this check" ; } -using openssl : : $(OPENSSL_ROOT)/lib $(OPENSSL_ROOT)/include ; -alias ssl : : /openssl//ssl/shared ; -alias crypto : : /openssl//crypto/shared ; local do_fail = [ indirect.make do_fail_impl ] ; @@ -74,7 +71,6 @@ local requirements = linux:_XOPEN_SOURCE=600 linux:_GNU_SOURCE=1 windows:_WIN32_WINNT=0x0601 - BOOST_ASIO_SEPARATE_COMPILATION on:BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT # Disable assertions when doing coverage, as they distort coverage data on:BOOST_DISABLE_ASSERTS From 949fd1cf11da1bf00051ed9d7931ed2ef9ade9e2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 4 Aug 2024 11:47:50 -0500 Subject: [PATCH 10/10] Update build deps. --- example/Jamfile | 2 ++ test/Jamfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/Jamfile b/example/Jamfile index 963b1c8bd..0e27f6bbf 100644 --- a/example/Jamfile +++ b/example/Jamfile @@ -7,6 +7,8 @@ import os ; +project : requirements /boost/mysql//boost_mysql ; + path-constant this_dir : . ; # The hostname to use for examples diff --git a/test/Jamfile b/test/Jamfile index 4cf6ca1b0..513e889c4 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -15,7 +15,7 @@ import ac ; import indirect ; import config : requires ; -project ; +project : requirements /boost/mysql//boost_mysql ; # Support header-only builds feature.feature boost.mysql.separate-compilation : on off : propagated composite ;