|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-11-03 17:21:34
ÐмиÑÑий ÐÑÑ
ипов wrote:
> РпиÑÑме Ð¾Ñ ÑÑеда, 3 ноÑбÑÑ 2021 г. 19:53:47 MSK полÑзоваÑÐµÐ»Ñ Peter
> Dimov via Boost напиÑал:
> > > РпиÑÑме Ð¾Ñ ÑÑеда, 3 ноÑбÑÑ 2021 г. 18:07:43 MSK полÑзоваÑÐµÐ»Ñ Peter
> > > Dimov via Boost напиÑал:
> > >
> > > > It's not so simple because dependencies are gathered when
> > > > generating the build variants (as they may depend on the current
> > > > properties) and header-only libraries have none.
> > >
> > >
> > > alias boost_foo : boost_bar ;
> > >
> > > boost_foo has a dependency: boost_bar.
> >
> >
> > Yeah, you don't say. It has no build variants though because it
> > doesn't build anything.
>
> Maybe I misunderstood your point. There are no build variants for `alias`
> targets, but there are no build variants for `INTERFACE` targets either. And this
> actually can be used to tell apart header-only libraries and compiled in the
> generating rule. `lib` targets do produce variants which refer back to them,
> but `alias` targets do not.
A target can have different dependencies depending on the build variant. For
instance, toolset=msvc may depend on Atomic, but toolset=gcc not; or
address-model=32 may depend on foo32.lib, but address-model=64 on foo64.lib.
That's why in boost-install the dependencies are determined when the build
variant is processed (and emitted in the -config-variant-*.cmake file.)
But header-only libraries don't have any such.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk