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

Klaim - Joël Lamotte mjklaim at gmail.com
Fri Dec 22 14:12:06 UTC 2017


On 22 December 2017 at 14:55, Boris Kolpackov <boris at codesynthesis.com>
wrote:

> 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
>

Thanks for this clarification. That's quite an interesting case indeed,
I didn't reach the point where I thought it could be possible (or useful)
to do so.

Joël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20171222/f05709c9/attachment.html>


More information about the users mailing list