Boost C++ 库

...世界上最受尊敬和专业设计的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu, C++ 编码标准

PrevUpHomeNext

步骤 2:配置 Boost.Build jamfile 以使用 AutoIndex

可用的索引选项
使 AutoIndex 成为可选

假设您有一个用于构建文档的 Jamfile,如下所示

boostbook standalone
    :
        mylibrary
    :
        # build requirements go here:
    ;

然后添加以下行

using auto-index ; 

到 Jamfile 的开头,然后将您想要的任何自动索引选项添加到 构建要求部分,例如

boostbook standalone
    :
        mylibrary
    :
        # Build requirements go here:

        # <auto-index>on (or off) one turns on (or off) indexing:
        <auto-index>on

        # Turns on (or off) auto-index-verbose for diagnostic info.
        # This is highly recommended until you have got all the many details correct!
        <auto-index-verbose>on

        # Choose the indexing method (separately for html and PDF) - see manual.
        # Choose indexing method for PDFs:
        <format>pdf:<auto-index-internal>off

        # Choose indexing method for html:
        <format>html:<auto-index-internal>on

        # Set the name of the script file to use (index.idx is popular):
        <auto-index-script>index.idx
        # Commands in the script file should all use RELATIVE PATHS
        # otherwise the script will not be portable to other machines.
        # Relative paths are normally taken as relative to the location
        # of the script file, but we can add a prefix to all
        # those relative paths using the <auto-index-prefix> feature.
        # The path specified by <auto-index-prefix> may be either relative or
        # absolute, for example the following will get us up to the boost root
        # directory for most Boost libraries:
        <auto-index-prefix>../../..

        # Tell Quickbook that it should enable indexing.
        <quickbook-define>enable_index ;

    ;
[Tip] 提示

始终将输出发送到日志文件。它将包含大量内容,但对于检查一切是否正常,或者诊断哪里出了问题非常有价值。

[Tip] 提示

返回代码 0 并不可靠地表明您已获得您真正想要的东西 - 检查日志文件是唯一确定的方法。

[Tip] 提示

如果您升级编译器版本,例如从 MSVC 9 升级到 10,那么您可能需要重建 Autoindex 以避免 Microsoft 所谓的“并行”错误。并确保您正在使用的 autoindex.exe 版本是新的。


PrevUpHomeNext