On 20 Apr 2026 00:08, Seth via Boost wrote:
On Sun, Apr 19, 2026, at 10:36 PM, Andrey Semashev via Boost wrote:
This is solved by adding a new target to Boost.Container CMakeLists.txt, e.g. `Boost::container_header_only` for the header-only bits. I would argue, this would be useful regardless of `hub` being part of Boost.Container. Some other libraries already provide more lightweight targets where a full dependency would be too expensive for users.
I always solve this by just depending on Boost::headers. Is there something I'm missing? Is there some added benefit of having "XXXX_header_only" targets per library as well?
The long-term plan is to not have Boost::headers target. Boost libraries already should have dependencies on other libraries' targets like Boost::container, including header-only libraries, in order to be compatible with modular design. I think, users should do the same already, although I'm not sure if this was communicated to the public. Therefore, it is beneficial for libraries to provide targets with reduced dependencies, where it makes sense. Some Boost libraries already do that.