[build2] How to setup a header-only library package

Boris Kolpackov boris at codesynthesis.com
Fri Dec 22 13:55:25 UTC 2017


Klaim - Joël Lamotte <mjklaim at gmail.com> writes:
 
> What is missing with module-only library? I didn't see any problem so far.

No, there is no problem. The more precise term would have been "module
interface-only library" but I am sure "module-only library" is what
everyone will use.

While there is nothing wrong with compiling the interfaces of an
interface-only library and packaging the resulting object files
into a library (which is what we do currently), seeing that the
consumer of the library will have to compile these interfaces
"for itself" (and seeing that two out of three compilers produce
both the bmi and obj in a single invocation), one may ask why
not just use these object files and get rid of the library.

This does seem like a sensible desire if the implementation is
inline or nearly-inline. So we need to think how this will fit
into our library model together with header-only libraries.

Boris



More information about the users mailing list