Subject: Re: [boost] <link>header?
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-23 13:42:59
Steven Watanabe wrote:
> On 01/22/2018 05:31 AM, Peter Dimov via Boost wrote:
> > Steven Watanabe wrote:
> >> So the question is what should <link>header do for libraries that do
> >> not have a header-only mode?
> > Fall back to <link>static, I suppose.
> Okay. So that means that a library with a header-only mode has to look
> lib boost_xxx : source.cpp ;
> alias boost_xxx : : <link>header : : <define>HEADER_ONLY ;
> # If you leave out the alias, <link>header becomes
> # equivalent to <link>static. It will still create
> # a separate build directory and propagate <link>header
> # to dependencies.
It looks like this is exactly what we want. If we have the graph
lib a ;
lib b : a ;
exe c : a b ;
and `b` doesn't support header-only, we still want the two `a`s to both use
header-only mode, to avoid ODR violations.
I wonder whether <link>inline is not a better name though.