Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-01-25 03:32:07


Vinnie Falco wrote:
> I believe that Boost should lead by example here. Libraries should be header-
> only as a coincidence and not by design. For example Boost.Variant2 should be
> header-only. But Boost.MySQL does not need to be header-only. In my
> opinion the best way to motivate people to learn how to properly compile and
> link external dependencies is to create non-header-only Boost libraries that are
> so compelling in features, so rewarding in value, that users will accept the cost
> of incorporating linkable external dependencies instead of forgoing useful
> libraries.

Interestingly, compiled libraries are in a way more convenient under CMake.

That's because for compiled libraries, there's no difference between
find_package and add_subdirectory/FetchContent use, one always links to
e.g. Boost::mysql, whereas header-only libraries don't have a corresponding
target in the find_package case.


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