From 4719fa5302d97ccf3c802150eaf0b58087f3741e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 5 Sep 2018 14:53:44 +0200 Subject: Add note on header-only/binless libraries in manual --- doc/manual.cli | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/manual.cli b/doc/manual.cli index a893622..e1d11e6 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -2511,6 +2511,20 @@ $ b config.bin.lib=both config.bin.exe.lib=static See the \c{bin} module for more information. @@ ref| +Note also that we don't need to change anything in the above \c{buildfile} if +our library is header-only. In \c{build2} this is handled dynamically based on +the absence of source file prerequisites. In fact, the same library can be +header-only on some platforms or in some configuration and \"source-full\" in +others. + +\N|In \c{build2} a header-only library (or a module interface-only library) is +not a different kind of library compared to static/shared libraries but is +rather a binary-less, or \i{binless} for short, library. So, theoretically, it +is possible to have a library that has a binless static and a binary-full +(\i{binfull}) shared variants. Note also that binless libraries can depend on +binfull libraries and are fully supported where the \c{pkg-config(1)} +functionality is concerned.| + Let's now turn to the second subject of this section and the last unexplained bit in our \c{buildfile}: shared library versionsing. Here is the relevant fragment: -- cgit v1.1