Boost logo

Boost :

Subject: Re: [boost] find_package(Boost) support
From: Paul Fultz II (pfultz2_at_[hidden])
Date: 2019-02-02 19:45:00


> On Feb 1, 2019, at 8:13 AM, Peter Dimov via Boost <boost_at_[hidden]> wrote:
>
> Roger Leigh wrote:
>> A heads up from the CMake side. Unfortunately, this is causing breakage with FindBoost, and we got the first bug:
>>
>> https://gitlab.kitware.com/cmake/cmake/issues/18865
>
> The complaint about not setting Boost_LIBRARIES is correct, and I don't think we should be setting it in 2019. I understand that FindBoost can't remove it for compatibility reasons, but new code should not be propagating "old CMake" practices.
>
> Regarding static/shared, the config files link to whatever is specified with Boost_USE_STATIC_LIBS (ON/OFF); when not set, they link to shared when BUILD_SHARED_LIBS is ON, to static otherwise.
>
> The alternative behavior under consideration was to always prefer shared unless Boost_USE_STATIC_LIBS=ON. Some people prefer the one, some the other, and I have no real way to gauge which one is better or more useful, with so little feedback.

It would be better to only add this logic when building both static and shared together. If the users just builds static or just build shared it should only use what was built regardless of BUILD_SHARED_LIBS.

Paul


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