From 333c304d84aaadf5b42aa344e4b87f5fbfd489ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Wed, 25 Jun 2025 18:51:42 -0500 Subject: [PATCH] Add support for modular build structure. (#36) * Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add requires-b2 check to top-level build file. * Bump B2 require to 5.2 * Change all references to . * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Switch to /boost/test//included target for header only mode of Boost.Test. * Update build deps. * Add GHA CI with simpler working one based on alandefreitas/cpp-actions utilities. * Move project global include to target local include. * Only msvc gets minor version tests. * Remove GHA CI to undo move to cpp-actions. --- build.jam | 30 ++++++++++++++++++++++++++++++ test/Jamfile.v2 | 6 ++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..6844bce --- /dev/null +++ b/build.jam @@ -0,0 +1,30 @@ +# Copyright René Ferdinand Rivera Morell 2023-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) + +require-b2 5.2 ; + +constant boost_dependencies : + /boost/array//boost_array + /boost/assert//boost_assert + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/functional//boost_functional + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/static_assert//boost_static_assert + /boost/type_traits//boost_type_traits ; + +project /boost/multi_array + ; + +explicit + [ alias boost_multi_array : : : + : include $(boost_dependencies) ] + [ alias all : boost_multi_array test ] + ; + +call-if : boost-library multi_array + ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ef1260e..6b4d6b4 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -6,6 +6,8 @@ import testing ; +project : requirements /boost/multi_array//boost_multi_array ; + compile-fail fail_cbracket.cpp ; compile-fail fail_cdata.cpp ; compile-fail fail_citerator.cpp ; @@ -15,7 +17,7 @@ compile-fail fail_csubarray.cpp ; compile-fail fail_csubarray2.cpp ; compile-fail fail_csubarray3.cpp ; compile-fail fail_cview.cpp ; -compile-fail fail_cview2.cpp ; +compile-fail fail_cview2.cpp : /boost/test//included ; compile-fail fail_cview3.cpp ; compile-fail fail_ref_cbracket.cpp ; compile-fail fail_ref_cdata.cpp ; @@ -28,7 +30,7 @@ compile-fail fail_ref_csubarray3.cpp ; compile-fail fail_ref_cview.cpp ; compile-fail fail_ref_cview2.cpp ; compile-fail fail_ref_cview3.cpp ; - + run constructors.cpp ; run access.cpp ; run compare.cpp ;