mirror of
https://github.com/boostorg/cobalt.git
synced 2026-01-26 06:22:31 +00:00
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * fix promise & generator operator= * added fno-exceptions support. * added experimental context support. * support for asio::yield_context * Add missing NO_LIB usage requirements. * added noop utility closes #3 * added support for __cpp_sized_deallocation in custom coroutine allocations. (non-apple) clang is weird, as it allowed sized deallocations on coroutine promises even when not enabled otherwise. Since apple does not, this should fix using cobalt on apple. * Add missing import-search for cconfig/predef checks. * Add requires-b2 check to top-level build file. * Update dependencies. * Fix -Wreorder flagging If using -Werror=reorder via some cmake build or otherwise, this gets flagged. * added move support for channels Closes #183 * fixed ctor so any works. Closes #182 * added noinline ot channel functions when compiling for windows. * removed move_only template inst from channel.cpp * Declared test targets with EXCLUDE_FROM_ALL Closes #181. * added generate-diagram option & cache * Cleaned up CML. Closes #135. * Bump B2 require to 5.2 * Move inter-lib dependencies to a project variable and into the build targets. * Move custom features to importable jam. --------- Co-authored-by: Klemens Morgenstern <klemens.d.morgenstern@gmail.com> Co-authored-by: Jonathan Stein <Jonathan.Stein@mavensecurities.com>
93 lines
2.2 KiB
Plaintext
93 lines
2.2 KiB
Plaintext
# 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 os ;
|
|
import-search /boost/config/checks ;
|
|
import config : requires ;
|
|
import-search /boost/cobalt ;
|
|
import boost-cobalt ;
|
|
|
|
|
|
project : requirements
|
|
<define>BOOST_ASIO_NO_DEPRECATED
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
|
<toolset>msvc:<cxxflags>/bigobj
|
|
<target-os>windows:<define>WIN32_LEAN_AND_MEAN
|
|
<target-os>linux:<linkflags>-lpthread
|
|
: source-location ../src
|
|
: common-requirements <library>$(boost_dependencies)
|
|
;
|
|
|
|
|
|
local config-binding = [ modules.binding config ] ;
|
|
config-binding ?= "" ;
|
|
|
|
alias cobalt_sources
|
|
: detail/exception.cpp
|
|
detail/util.cpp
|
|
channel.cpp
|
|
error.cpp
|
|
main.cpp
|
|
this_thread.cpp
|
|
thread.cpp
|
|
;
|
|
|
|
explicit cobalt_sources ;
|
|
|
|
lib boost_cobalt
|
|
: cobalt_sources
|
|
: requirements <define>BOOST_COBALT_SOURCE=1
|
|
<link>shared:<define>BOOST_COBALT_DYN_LINK=1
|
|
[ requires
|
|
cxx20_hdr_concepts
|
|
]
|
|
<boost.cobalt.pmr>boost-container:<library>/boost/container//boost_container
|
|
[ check-target-builds
|
|
$(config-binding:D)//cpp_lib_memory_resource
|
|
cpp_lib_memory_resource
|
|
: <conditional>@set-pmr-std
|
|
: <conditional>@set-pmr-boost
|
|
]
|
|
|
|
: usage-requirements
|
|
<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
|
|
: <conditional>@set-pmr-std
|
|
: <conditional>@set-pmr-boost
|
|
]
|
|
;
|
|
|
|
rule set-pmr-boost ( props * )
|
|
{
|
|
if ! <boost.cobalt.pmr> in $(props:G)
|
|
{
|
|
return <boost.cobalt.pmr>boost-container ;
|
|
}
|
|
|
|
if <boost.cobalt.pmr>boost-container in $(props)
|
|
{
|
|
return <boost.cobalt.pmr>boost-container ;
|
|
}
|
|
}
|
|
|
|
rule set-pmr-std ( props * )
|
|
{
|
|
if ! <boost.cobalt.pmr> in $(props:G)
|
|
{
|
|
return <boost.cobalt.pmr>std ;
|
|
}
|
|
|
|
if <boost.cobalt.pmr>std in $(props)
|
|
{
|
|
return <boost.cobalt.pmr>std ;
|
|
}
|
|
}
|