# Copyright René Ferdinand Rivera Morell 2023-2024
# Copyright (c) 2025 Christopher M. Kohlhoff (chris at kohlhoff dot com)
# 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_deps_core :
    /boost/align//boost_align
    /boost/assert//boost_assert
    /boost/config//boost_config
    /boost/system//boost_system
    /boost/throw_exception//boost_throw_exception ;

constant boost_deps_deadline_timer :
    /boost/asio//boost_asio_core
    /boost/date_time//boost_date_time ;

constant boost_deps_spawn :
    /boost/asio//boost_asio_core
    /boost/context//boost_context ;

constant boost_deps_all :
    /boost/asio//boost_asio_core
    /boost/asio//boost_asio_deadline_timer
    /boost/asio//boost_asio_spawn ;

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

local examples = [ glob-tree-ex example : Jamfile.v2 ] ;

explicit
    [ alias boost_asio_core : : : : <library>$(boost_deps_core) ]
    [ alias boost_asio_deadline_timer : : : : <library>$(boost_deps_deadline_timer) ]
    [ alias boost_asio_spawn : : : : <library>$(boost_deps_spawn) ]
    [ alias boost_asio : : : : <library>$(boost_deps_all) ]
    [ alias all : boost_asio test $(examples:D) ]
    ;

call-if : boost-library asio
    ;

