Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2019-06-07 07:12:37


Hi Peter,

thanks, yes this fixes the issue, although I'd used an "elseif" to
reduce the nesting.

Another possible issue is pretty much every use of `if(NOT Boost_*`,
e.g. `if(NOT Boost_USE_STATIC_RUNTIME)`. The CMake FindModule documents
this as "Set to ON or OFF to specify whether to use libraries linked
statically to the C++ runtime ('s' tag). Default is platform dependent.".
The current implementation is "Default is OFF".

This should be checked for all other variables too. E.g.
"Boost_USE_DEBUG_RUNTIME" should default to "ON". Currently it seems to
be kinda random: Depending on which variant file gets sourced last,
that's the one that wins. Not sure how to solve this other than ordering
the variant includes appropriately.

Finally: All uses of `message` should be reevaluated and either removed
or guarded by `Boost_DEBUG` or `*_FIND_QUIETLY`. There is to much noise
especially when you have multiple calls to FindPackage(Boost...) with
different components over the project. Stuff like "Found x" is handled
by the final "find_package_handle_standard_args" (at least in recent
CMake Find module) and "Adding xxx dependencies: " is a Debug output at
best.

Some possible improvements:

- Adding the _BOOST_INCLUDEDIR is not required. All targets depend on
Boost::headers which has them. Same for BOOST_ALL_NO_LIB definition
- Regarding: "find_dependency doesn't forward arguments until 3.9, so we
have to roll our own". This does not seem correct:
https://cmake.org/cmake/help/v3.0/module/CMakeFindDependencyMacro.html
Replacing this would reduce the amount of code

Regards, Alex

Am 06.06.19 um 23:48 schrieb Peter Dimov via Boost:
> Alexander Grund wrote:
>
>> Hi all,
>>
>> I discovered a severe logic flaw in the generated CMake Config files
>> for the new Boost 1.70 which make them almost unusable.
>
> This bug should be fixed in
>
> https://github.com/boostorg/boost_install/commit/160c7cb2b2c720e74463865ef0454d4c4cd9ae7c
>
>
> If you discover anything else wrong with the current master/develop,
> do let me know; it would be nice if we could get 1.71 as correct as
> possible. Unfortunately, most mistakes are only discovered after the
> release goes out, and by then it's too late.




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