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. #192

Merged
merged 30 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
08198cb
Make the library modular usable.
grafikrobot Mar 11, 2024
a9e843f
Switch to library requirements instead of source. As source puts extr…
grafikrobot Mar 30, 2024
e0c852c
Sync from upstream.
grafikrobot Apr 10, 2024
c0f0768
fix promise & generator operator=
klemens-morgenstern Apr 20, 2024
77d3d89
added fno-exceptions support.
klemens-morgenstern Mar 14, 2024
3071c0f
added experimental context support.
klemens-morgenstern Mar 10, 2024
c41660e
support for asio::yield_context
klemens-morgenstern Mar 12, 2024
3a50ed4
Sync from upstream.
grafikrobot Apr 25, 2024
e5f145e
Add missing NO_LIB usage requirements.
grafikrobot Apr 29, 2024
9953526
added noop utility
klemens-morgenstern May 1, 2024
7f334f2
added support for __cpp_sized_deallocation in custom coroutine alloca…
klemens-morgenstern May 2, 2024
2a42353
Sync from upstream.
grafikrobot May 3, 2024
3ab07fe
Add missing import-search for cconfig/predef checks.
grafikrobot May 5, 2024
3b88b4c
Add requires-b2 check to top-level build file.
grafikrobot May 5, 2024
df750b7
Update dependencies.
grafikrobot May 14, 2024
4009635
Fix -Wreorder flagging
13steinj Dec 27, 2023
9502d09
added move support for channels
klemens-morgenstern May 27, 2024
7616910
fixed ctor so any works.
klemens-morgenstern May 27, 2024
d5abc2e
added noinline ot channel functions when compiling for windows.
klemens-morgenstern May 29, 2024
2f07dfb
removed move_only template inst from channel.cpp
klemens-morgenstern May 30, 2024
86c8f15
Declared test targets with EXCLUDE_FROM_ALL
klemens-morgenstern May 30, 2024
a9ebaf9
added generate-diagram option & cache
klemens-morgenstern May 30, 2024
da63e5c
Sync from upstream.
grafikrobot May 30, 2024
5939e0b
Cleaned up CML.
klemens-morgenstern May 31, 2024
4812579
Sync from upstream.
grafikrobot Jun 2, 2024
1176df0
Bump B2 require to 5.2
grafikrobot Jun 14, 2024
3a9044a
Sync from upstream.
grafikrobot Jul 12, 2024
d6c0324
Move inter-lib dependencies to a project variable and into the build …
grafikrobot Jul 24, 2024
c6db741
Sync from upstream.
grafikrobot Jul 25, 2024
c0b12fa
Move custom features to importable jam.
grafikrobot Aug 15, 2024
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
19 changes: 19 additions & 0 deletions boost-cobalt.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2023 Klemens D. Morgenstern
#
# 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 feature ;


feature.feature boost.cobalt.pmr : std boost-container custom no : propagated composite ;
feature.compose <boost.cobalt.pmr>std : <define>BOOST_COBALT_USE_STD_PMR=1 ;
feature.compose <boost.cobalt.pmr>boost-container : <define>BOOST_COBALT_USE_BOOST_CONTAINER_PMR=1 ;
feature.compose <boost.cobalt.pmr>custom : <define>BOOST_COBALT_USE_CUSTOM_PMR=1 ;
feature.compose <boost.cobalt.pmr>no : <define>BOOST_COBALT_NO_PMR=1 ;

feature.feature boost.cobalt.executor : any_io_executor use_io_context custom : propagated composite ;
feature.compose <boost.cobalt.executor>any_io_executor : ;
feature.compose <boost.cobalt.executor>use_io_context : <define>BOOST_COBALT_USE_IO_CONTEXT=1 ;
feature.compose <boost.cobalt.executor>custom_executor : <define>BOOST_COBALT_CUSTOM_EXECUTOR=1 ;
37 changes: 37 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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)

require-b2 5.2 ;

constant boost_dependencies :
/boost/asio//boost_asio
/boost/callable_traits//boost_callable_traits
/boost/circular_buffer//boost_circular_buffer
/boost/config//boost_config
/boost/container//boost_container
/boost/context//boost_context
/boost/core//boost_core
/boost/intrusive//boost_intrusive
/boost/leaf//boost_leaf
/boost/mp11//boost_mp11
/boost/preprocessor//boost_preprocessor
/boost/smart_ptr//boost_smart_ptr
/boost/system//boost_system
/boost/throw_exception//boost_throw_exception
/boost/variant2//boost_variant2 ;

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

explicit
[ alias boost_cobalt : build//boost_cobalt ]
[ alias all : boost_cobalt test example ]
;

call-if : boost-library cobalt
;

28 changes: 9 additions & 19 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@


import os ;
import feature ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;
import-search /boost/cobalt ;
import boost-cobalt ;


project : requirements
Expand All @@ -17,20 +19,10 @@ project : requirements
<target-os>windows:<define>WIN32_LEAN_AND_MEAN
<target-os>linux:<linkflags>-lpthread
: source-location ../src
: common-requirements <library>$(boost_dependencies)
;


feature.feature boost.cobalt.pmr : std boost-container custom no : propagated composite ;
feature.compose <boost.cobalt.pmr>std : <define>BOOST_COBALT_USE_STD_PMR=1 ;
feature.compose <boost.cobalt.pmr>boost-container : <define>BOOST_COBALT_USE_BOOST_CONTAINER_PMR=1 ;
feature.compose <boost.cobalt.pmr>custom : <define>BOOST_COBALT_USE_CUSTOM_PMR=1 ;
feature.compose <boost.cobalt.pmr>no : <define>BOOST_COBALT_NO_PMR=1 ;

feature.feature boost.cobalt.executor : any_io_executor use_io_context custom : propagated composite ;
feature.compose <boost.cobalt.executor>any_io_executor : ;
feature.compose <boost.cobalt.executor>use_io_context : <define>BOOST_COBALT_USE_IO_CONTEXT=1 ;
feature.compose <boost.cobalt.executor>custom_executor : <define>BOOST_COBALT_CUSTOM_EXECUTOR=1 ;

local config-binding = [ modules.binding config ] ;
config-binding ?= "" ;

Expand All @@ -50,10 +42,10 @@ lib boost_cobalt
: cobalt_sources
: requirements <define>BOOST_COBALT_SOURCE=1
<link>shared:<define>BOOST_COBALT_DYN_LINK=1
[ requires
[ requires
cxx20_hdr_concepts
]
<boost.cobalt.pmr>boost-container:<library>/boost//container
<boost.cobalt.pmr>boost-container:<library>/boost/container//boost_container
[ check-target-builds
$(config-binding:D)//cpp_lib_memory_resource
cpp_lib_memory_resource
Expand All @@ -62,8 +54,9 @@ lib boost_cobalt
]

: usage-requirements
<boost.cobalt.pmr>boost-container:<library>/boost//container
<boost.cobalt.pmr>boost-container:<library>/boost/container//boost_container
<link>shared:<define>BOOST_COBALT_DYN_LINK=1
<define>BOOST_COBALT_NO_LINK=1
[ check-target-builds
$(config-binding:D)//cpp_lib_memory_resource
cpp_lib_memory_resource
Expand Down Expand Up @@ -97,6 +90,3 @@ rule set-pmr-std ( props * )
return <boost.cobalt.pmr>std ;
}
}

boost-install boost_cobalt ;

19 changes: 10 additions & 9 deletions example/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@


import os ;
import-search /boost/cobalt ;
import boost-cobalt ;


project : requirements
Expand All @@ -18,12 +20,11 @@ project : requirements
<toolset>clang-14:<boost.cobalt.pmr>boost-container
;

exe channel : channel.cpp /boost//cobalt ;
exe delay : delay.cpp /boost//cobalt ;
exe delay_op : delay_op.cpp /boost//cobalt ;
exe echo_server : echo_server.cpp /boost//cobalt ;
exe outcome : outcome.cpp /boost//cobalt ;
exe thread : thread.cpp /boost//cobalt ;
exe thread_pool : thread_pool.cpp /boost//cobalt ;
# exe ticker : ticker.cpp /boost//json /boost//cobalt ;

exe channel : channel.cpp /boost/cobalt//boost_cobalt ;
exe delay : delay.cpp /boost/cobalt//boost_cobalt ;
exe delay_op : delay_op.cpp /boost/cobalt//boost_cobalt ;
exe echo_server : echo_server.cpp /boost/cobalt//boost_cobalt ;
exe outcome : outcome.cpp /boost/cobalt//boost_cobalt /boost/outcome//boost_outcome ;
exe thread : thread.cpp /boost/cobalt//boost_cobalt ;
exe thread_pool : thread_pool.cpp /boost/cobalt//boost_cobalt ;
# exe ticker : ticker.cpp /boost/cobalt//boost_cobalt /boost/json//boost_json ;
8 changes: 5 additions & 3 deletions test/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@


import os ;
import-search /boost/cobalt ;
import boost-cobalt ;


project : requirements
Expand All @@ -20,12 +22,12 @@ project : requirements

import testing ;

lib test_impl : test_main.cpp /boost//cobalt /boost//unit_test_framework :
lib test_impl : test_main.cpp /boost/cobalt//boost_cobalt /boost/test//boost_unit_test_framework :
<link>static
;

run main.cpp /boost//cobalt ;
run main_compile.cpp /boost//cobalt util.cpp concepts.cpp ;
run main.cpp /boost/cobalt//boost_cobalt ;
run main_compile.cpp /boost/cobalt//boost_cobalt util.cpp concepts.cpp ;

for local src in [ glob *.cpp : main.cpp main_compile.cpp test_main.cpp concepts.cpp util.cpp ]
{
Expand Down
Loading