$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [build] Tests automatically create header links, but library builds do not
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-01-05 11:46:35
On Mon, Jan 5, 2015 at 4:16 PM, Peter Dimov <lists_at_[hidden]> wrote:
> Andrey Semashev wrote:
>>
>> Alternatively, is it possible to add a dependency on a header-only library
>> so that its include path (e.g. libs/type_traits/include) is added to
>> compiler switches? This dependency would have to be transitive, so that if I
>> add it to Atomic, other libraries that use Atomic also get the include path
>> for TypeTraits. If this is done there would be no need for linking headers
>> prior to building libraries.
>
>
> We touched on this earlier. Yes, I believe it's possible, via
> usage-requirements. But this scheme, if applied globally, would require all
> libraries (including header-only ones) to explicitly list their dependencies
> in their Jamfiles. It will also result in some rather long command lines for
> the libraries at the higher levels.
>
> I suppose that what you have in mind is to only apply this to specific
> libraries, such as Atomic or mpl-core. But it will also require applying it
> to their dependencies, such as TypeTraits, otherwise headers indirectly
> included from Atomic via TypeTraits will (potentially) not be linked and
> found.
The idea is somewhat connected to the recent topic about the directory
structure. If we intend to remove the $BOOST_ROOT/boost (or
$BOOST_ROOT/include/boost) directory in the developer setups then we'd
have to make a change like this to all Jamfiles. But for now, as long
as we have that common directory, such massive changes are not
necessary, and we could get away with a less intrusive change - just
to automatically invoke the headers target before building anything. I
was hoping that such a change could be done solely within Boost.Build.
Of course, if that's not possible then we could discuss those larger
changes.