On Mon, Oct 15, 2018 at 8:20 PM Peter Dimov via Boost
Louis Dionne wrote:
Would it be possible to have one Boost::XYZ library for each header-only library XYZ?
It's possible in principle; my first iteration did have targets for all libraries. I'd however prefer to get a release out using this scheme first, to see how it fares in the field.
Ok, I agree with that approach.
There are several possible approaches we could adopt if we want targets for all libraries, and the one I like is to go full modular and add build/Jamfiles to header-only libraries, with stage and install targets that link/copy the headers. So that you could `b2 --prefix=~/.local install-hana` from top level and get, in ~/.local/include, Hana's headers and the headers of its dependencies, and in ~/.local/lib/cmake, the config files of same.
That would be great.
[...]
2. It allows providing compile options or required compile features via
the imported target. For example, I may want someone "linking" against Boost::hana to get `-Wno-user-defined-literal` automatically (I don't, but you get the idea).
How are you going to communicate your target_compile_definitions (or whatever) to the code generating the config file? Perhaps you'll have a ready-made config file that would be installed instead of the generated one?
I see two main options: 1. What you suggest, i.e. a ready-made config file that can be installed through Bjam. 2. Somehow have Bjam call into CMake to install that. I'm fine with (1), at least initially. With your current solution, is there a way to substitute the Config files being automatically generated for Config files of my choice? Louis