Boost logo

Boost :

Subject: Re: [boost] Fwd: Installing CMake configuration files
From: Peter Dimov (pdimov_at_[hidden])
Date: 2018-10-20 18:19:51

Steven Watanabe wrote:

> Before we go there, however, I'd like to discuss whether it's actually the
> right thing to do. In particular, I don't want to go down a path that
> will get in the way of modular installation for headers.
> # Ideally it should look something like this:
> link-directory headers : ../include
> : requirements <location>$(BOOST_ROOT)
> : usage-requirements <include>$(BOOST_ROOT) ;
> alias boost_any : headers /boost/config//boost_config ;
> boost-install boost_any ;

I'm not sure we want that. A modular header-only library should have
usage-requirements <include>../include, not <include>$(BOOST-ROOT) (and
consequently should not link headers when used as a dependency.)

There are two cases: the library using the header-only library is
"modularity-aware" and has enumerated its header-only dependencies as
<library>/boost/any, or isn't and hasn't.

If it is and has, it doesn't need the links in boost/.

If it isn't and hasn't, `any` having <include>$(BOOST-ROOT) in its
usage-requirements doesn't matter as it won't be seen. In this case, the
dependency on /boost/headers that we inject will both link the headers and
give the <include>$(BOOST-ROOT).

(I was thinking that /boost/headers can become a regular alias to
libs/headers/build, whose implicit `stage` will then link the headers. But
it will work the same either way.)

In case it isn't clear, the above assumes incremental transition to the
modular layout, where some libraries are modular, others aren't yet. So we
have four types of libraries:

1. Old-school header-only libraries, without build/Jamfile. These all form
the metalibrary /boost/headers. When staged, /boost/headers links everything
into boost/, as before. When installed, it copies all headers that aren't
otherwise covered below, into the install location.

2. Newfangled header-only libraries, with build/Jamfile. When staged, these
do nothing. When installed, they install their headers.

3. Old-school buildable libraries. These have a dependency on

4. Newfangled buildable libraries. These enumerate all of their dependencies
in their Jamfile, including type 2 header-only ones. If they use no type 1
libraries, they don't need a dependency on /boost/headers, and don't need
the header links.

Boost list run by bdawes at, gregod at, cpdaniel at, john at