Boost logo

Boost :

Subject: Re: [boost] Boost CMake update
From: paul (pfultz2_at_[hidden])
Date: 2017-10-04 15:16:59


On Wed, 2017-10-04 at 03:09 +0300, Peter Dimov via Boost wrote:
> paul wrote:
> >
> > >
> > > As I already mentioned a number of times, this in my opinion must be
> > >
> > >     find_package(boost_assert VERSION 1.64.0 EXACT)
> > >
> > > because there is never, ever, a scenario in which I want boost_core 
> > > 1.64.0 to link to boost_assert 1.58.0.
> > The user may want to use boost_core 1.64.0 with boost_assert 1.64.1 or 
> > 1.65 because perhaps the newer version is from develop that fixes a 
> > problem they are having.
> Yeah. How would this scenario come into being though? Suppose you have 
> 1.64.0 already installed; you replace boost_assert from develop and now, as 
> also mentioned a number of times, you have all manners of ODR violations 
> because your libraries are built against boost_assert 1.64.0 and you're 
> including the develop one. 

If you change your dependencies, you would most likely change the library that
depend on those as well. 

Even if they didn't rebuild, it doesn't always mean it would lead to an ODR
violation, as the change could only affect some assert macros that are not
used in the definition.

Of course, adding the version doesn't prevent the scenario you mention. They
could just reinstall a whole new version of boost 1.65 and the libraries that
were built against boost 1.64 would be broken.

Or they could create a superproject of the different boost modules, with using
1.64 for everything except boost_assert. This still would affect downstream
libraries that were built against an older version of boost.

Paul

.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk