Andrey Semashev wrote:
Alternatively, is it possible to add a dependency on a header-only library so that its include path (e.g. libs/type_traits/include) is added to compiler switches? This dependency would have to be transitive, so that if I add it to Atomic, other libraries that use Atomic also get the include path for TypeTraits. If this is done there would be no need for linking headers prior to building libraries.
We touched on this earlier. Yes, I believe it's possible, via usage-requirements. But this scheme, if applied globally, would require all libraries (including header-only ones) to explicitly list their dependencies in their Jamfiles. It will also result in some rather long command lines for the libraries at the higher levels. I suppose that what you have in mind is to only apply this to specific libraries, such as Atomic or mpl-core. But it will also require applying it to their dependencies, such as TypeTraits, otherwise headers indirectly included from Atomic via TypeTraits will (potentially) not be linked and found.