On 6/6/2021 9:11 PM, Peter Dimov via Boost wrote:
Some libraries (I encountered this when porting the tests of Signals2) use Boost.Test in header-only mode, by including
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".
Since it is totally legitimate to use Boost.Test in header only mode, and many libraries currently do this, it is hardly a "waste of time" to support this under CMake.