Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #223

Merged
merged 23 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Jamfile.v2

This file was deleted.

31 changes: 31 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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/assert//boost_assert
/boost/config//boost_config
/boost/container//boost_container
/boost/core//boost_core
/boost/intrusive//boost_intrusive
/boost/move//boost_move
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/winapi//boost_winapi ;

project /boost/interprocess
: common-requirements
<include>include
;

explicit
[ alias boost_interprocess : : : : <library>$(boost_dependencies) ]
[ alias all : boost_interprocess example test ]
;

call-if : boost-library interprocess
;

18 changes: 9 additions & 9 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ path-constant here : . ;

doxygen autodoc
:
[ glob ../../../boost/interprocess/*.hpp ]
[ glob ../../../boost/interprocess/allocators/*.hpp ]
[ glob ../../../boost/interprocess/containers/*.hpp ]
[ glob ../../../boost/interprocess/indexes/*.hpp ]
[ glob ../../../boost/interprocess/ipc/*.hpp ]
[ glob ../../../boost/interprocess/mem_algo/*.hpp ]
[ glob ../../../boost/interprocess/smart_ptr/*.hpp ]
[ glob ../../../boost/interprocess/streams/*.hpp ]
[ glob ../../../boost/interprocess/sync/*.hpp ]
[ glob ../include/boost/interprocess/*.hpp ]
[ glob ../include/boost/interprocess/allocators/*.hpp ]
[ glob ../include/boost/interprocess/containers/*.hpp ]
[ glob ../include/boost/interprocess/indexes/*.hpp ]
[ glob ../include/boost/interprocess/ipc/*.hpp ]
[ glob ../include/boost/interprocess/mem_algo/*.hpp ]
[ glob ../include/boost/interprocess/smart_ptr/*.hpp ]
[ glob ../include/boost/interprocess/streams/*.hpp ]
[ glob ../include/boost/interprocess/sync/*.hpp ]
:
<doxygen:param>EXTRACT_ALL=NO
<doxygen:param>HIDE_UNDOC_MEMBERS=YES
Expand Down
18 changes: 9 additions & 9 deletions doc/interprocess.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -4298,7 +4298,7 @@ be also useful to build small databases for embedded systems limiting the size o
the used memory to a predefined memory chunk, instead of letting the database
fragment the heap memory.

[*Note:] The external memory supplied by the user shall be aligned to the maximum value between
[*Note:] The external memory supplied by the user shall be aligned to the maximum value between
`alignof(max_align_t)` and the alignment of the strictest over-aligned type to be built inside
that memory.

Expand Down Expand Up @@ -6528,7 +6528,7 @@ will manage the index. `segment_manager` will define interesting internal types
For example, the index type `flat_map_index` based in `boost::interprocess::flat_map`
is just defined as:

[import ../../../boost/interprocess/indexes/flat_map_index.hpp]
[import ../include/boost/interprocess/indexes/flat_map_index.hpp]
[flat_map_index]


Expand Down Expand Up @@ -6622,8 +6622,8 @@ define `BOOST_INTERPROCESS_SHARED_DIR_FUNC` and implement the following function

[c++]

namespace boost {
namespace interprocess {
namespace boost {
namespace interprocess {
namespace ipcdetail {
void get_shared_dir(std::string &shared_dir);
//wstring overload is only needed for Windows systems
Expand Down Expand Up @@ -6651,13 +6651,13 @@ those heavy headers.
On systems without POSIX shared memory support, shared memory objects are implemented as memory mapped files, using a directory
placed in "/tmp" that can include (if `BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME` is defined) the last bootup time (if the OS supports it).
As in Windows, in any error case obtaining this directory the library throws an error . When your shared directory is a compile-time constant,
define `BOOST_INTERPROCESS_SHARED_DIR_PATH` when using the library and that path will be used to place shared memory files. When you have
to determine the shared directory at runtime, define `BOOST_INTERPROCESS_SHARED_DIR_FUNC` and implement the function
define `BOOST_INTERPROCESS_SHARED_DIR_PATH` when using the library and that path will be used to place shared memory files. When you have
to determine the shared directory at runtime, define `BOOST_INTERPROCESS_SHARED_DIR_FUNC` and implement the function

[c++]

namespace boost {
namespace interprocess {
namespace boost {
namespace interprocess {
namespace ipcdetail {
void get_shared_dir(std::string &shared_dir);
}
Expand Down Expand Up @@ -7059,7 +7059,7 @@ thank them:
* [@https://svn.boost.org/trac/boost/ticket/10229 Trac #10229 (['"Compiling errors in interprocess\detail\os_file_functions.hpp"])].
* [@https://svn.boost.org/trac/boost/ticket/10506 Trac #10506 (['"Infinite loop in create_or_open_file"])].
* [@https://github.com/boostorg/interprocess/pull/11 GitHub Pull #11 (['"Compile fix for BOOST_USE_WINDOWS_H"])].

* Reorganized Doxygen marks to obtain a better header reference.

[endsect]
Expand Down
38 changes: 16 additions & 22 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,36 @@
# 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 testing ;

# this rule enumerates through all the sources and invokes
# the run rule for each source, the result is a list of all
# the run rules, which we can pass on to the test_suite rule:

project : requirements
<library>/boost/interprocess//boost_interprocess
<toolset>acc:<linkflags>-lrt
<toolset>acc-pa_risc:<linkflags>-lrt
<toolset>gcc,<target-os>windows:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
<target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>linux:<linkflags>"-lrt"
<library>/boost/multi_index//boost_multi_index
<library>/boost/unordered//boost_unordered
;

rule test_all
{
local all_rules = ;

for local fileb in [ glob comp*.cpp ]
{
all_rules += [ link $(fileb)
: # additional args
<toolset>acc:<linkflags>-lrt
<toolset>acc-pa_risc:<linkflags>-lrt
<toolset>gcc,<target-os>windows:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
<target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>linux:<linkflags>"-lrt"
: # test-files
: # requirements
] ;
all_rules += [ link $(fileb) ] ;
}

for local fileb in [ glob doc_*.cpp ]
{
all_rules += [ run $(fileb)
: # additional args
: # test-files
: # requirements
<toolset>acc:<linkflags>-lrt
<toolset>acc-pa_risc:<linkflags>-lrt
<toolset>gcc-mingw:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
<target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>linux:<linkflags>"-lrt"
] ;
all_rules += [ run $(fileb) ] ;
}

return $(all_rules) ;
Expand Down
24 changes: 13 additions & 11 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@
# the run rule for each source, the result is a list of all
# the run rules, which we can pass on to the test_suite rule:

project : requirements
<library>/boost/interprocess//boost_interprocess
<library>/boost/date_time//boost_date_time
<toolset>acc:<linkflags>-lrt
<toolset>acc-pa_risc:<linkflags>-lrt
<toolset>gcc,<target-os>windows:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
<target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>linux:<linkflags>"-lrt"
<library>/boost/chrono//boost_chrono
;

rule test_all
{
local all_rules = ;

for local fileb in [ glob *.cpp ]
{
all_rules += [ run $(fileb)
: # additional args
: # test-files
: # requirements
<toolset>acc:<linkflags>-lrt
<toolset>acc-pa_risc:<linkflags>-lrt
<toolset>gcc,<target-os>windows:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
<target-os>windows,<toolset>clang:<linkflags>"-lole32 -loleaut32 -lpsapi -ladvapi32"
<target-os>linux:<linkflags>"-lrt"
] ;
all_rules += [ run $(fileb) ] ;
}

return $(all_rules) ;
Expand Down
Loading