|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-06-07 01:51:51
Glen Fernandes wrote:
> On Sun, Jun 6, 2021 at 9:12 PM Peter Dimov via Boost
> <boost_at_[hidden]> wrote:
> >
> > Some libraries (I encountered this when porting the tests of Signals2)
> > use Boost.Test in header-only mode, by including
> > <boost/test/included/unit_test.hpp>
> > without linking to anything. This worked in the "legacy" structure
> > where all headers are always available, but doesn't work under CMake
> > where you have to link to header-only libraries in order to get the
> > proper include path.
> >
> > Should we make an attempt to support this use by declaring a special
> > header-only target in Boost.Test (e.g. Boost::included_unit_test), or
> > is that a waste of time? One can as well link to the proper
> > Boost::unit_test_framework (and then even use it header-only, although
> > there's not much point in doing so.)
> >
> > I'm inclined towards "waste of time".
>
> Likewise.
>
> What is the list of libraries that do this? I'm curious if most of them are
> unmaintained or would otherwise be better served migrating to LWT.
The libraries that use the "included/" versions of the Test libraries are
actually the maintained ones, because the unmaintained ones are still
on the deprecated <boost/test/minimal.hpp>. :-)
The `included` ones are
algorithm
filesystem
geometry
heap
lockfree
math
mpi
numeric/conversion
numeric/odeint
numeric/ublas
process
ptr_container
random
range
signals2
sort
type_traits
uuid
yap
so this is widely used, and in fairness, it's a legitimate and documented
way to use Boost.Test.
I don't think we need to change anything in the libraries, but I also don't
think we need to duplicate the Boost.Test CMake targets to make them
have header-only versions. Linking to the normal target will also enable
the header-only use to compile.
For completeness, the libraries using the deprecated boost/test/minimal.hpp
are:
foreach
graph
graph_parallel
iterator
logic
numeric/conversion
numeric/interval
property_map
tokenizer
units
yap
These need to migrate to either LWT or the non-deprecated Boost.Test.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk