需要帮助了解 header-only 个库的 Boost 常见问题解答

Need help on understanding Boost FAQ on header-only libraries

我正在阅读 installing Boost from sources when I just cross-referenced enter link description here 上面写着:

However, with Boost.Build a header-only library can be declared as Boost.Build target and all dependents can use such library without having to remember whether it is a header-only library or not.

然后有描述为:

alias my-lib
    : # no sources
    : # no build requirements
    : # no default build
    : <include>whatever ;

这是如何连接的以及它试图用上述别名规则解释什么?

FAQ 条目与在您的系统上安装 Boost 库无关。

FAQ 条目适用于使用 Boost.Build 作为构建系统(而不是 make、CMake 等)的人。他们观察到一些库仅包含头文件,其中整个库仅存在于头文件中,不需要 linking .a.so。在某些构建系统中,很难将此类库指定为依赖项,因为构建系统实际上并不构建它们,不 link 它们,甚至可能不知道它们存在(如果安装在包含路径中)。 Boost.Build 使用 alias 命令来指定此类库。

只有头文件的库的一个例子是 Boost 本身,它的大部分模块只存在于头文件中。