IncrediBuild 构建配置

Projects >Build & Run >Build >Build Settings 中指定所选工具包的构建设置。

您可以为 IncrediBuild 指定构建步骤和清理步骤。

IncrediBuild 构建步骤

要使用 IncrediBuild,请选择Add Build Step >IncrediBuild for LinuxIncrediBuild for Windows

IncrediBuild 生成步骤

IncrediBuild 通过遍历已定义的构建步骤,自动检测构建步骤。初始构建步骤设置将成为 IncrediBuild 构建步骤的一部分,因此仍将使用常用的构建工具,但会增加 IncrediBuild 的构建加速功能和图形化构建监控器。

Target and configuration 组中,指定用于构建构建命令的命令助手和参数。

构建错误和警告将被解析并显示在 "问题"中。

选择Keep original jobs number 复选框可阻止 IncrediBuild 覆盖-j 命令行开关,该开关可控制Qt Creator 执行的构建工具并行运行的进程数量。IncrediBuild 设置的默认值是 200。

要指定的分发控制设置取决于你使用的是 Linux 还是 Windows。

Linux 下的分发控制设置

用于 Linux 的 IncrediBuild 构建步骤

可以为 Linux 编译指定以下设置:

  • Nice value 是一个介于 -20 和 19 之间的数值
  • Force remote 强制 任务到远程帮助程序。allow_remote
  • Alternate tasks preference

Windows 上的分发控制设置

用于 Windows 的 IncrediBuild 构建步骤

您可以为 Windows 构建指定以下设置:

设置
Profile.xml定义自动拦截接口如何处理分布式任务中的进程。Visual Studio 或 Make 和 Build 工具的构建不需要此设置,但如果这些构建使用的进程未包含在这些软件包中,则可使用此设置添加配置选项。在 Dev Tools 构建中配置可分发进程时需要使用该选项。
Avoid local task execution释放启动程序机器上的资源。如果启动器因 CPU 占用率过高而成为构建的瓶颈,这可能有利于分发。
Maximum CPUs to utilize in the build指定构建过程中要使用的远程内核的最大数量。覆盖相应的全局设置。
Newest allowed helper machine OS

Oldest allowed helper machine OS

指定允许作为帮助程序参与构建的帮助程序计算机上安装的最新和最旧的操作系统。
Build title指定将显示在联编输出文本开头的自定义标题行。该标题也将用于 "构建历史 "和 "构建监控 "显示。
Save IncrediBuild monitor file将构建进度 (.ib_mon) 文件的副本写入指定位置。如果只给出文件夹名称,IncrediBuild 会为文件名生成一个 GUID。在编译输出的末尾会添加一条信息,说明保存的.ib_mon 文件的位置。
Suppress STDOUT不向标准输出写入任何内容。
Output Log file将编译输出写入文件。
Show Commands in output显示 IncrediBuild 用来构建文件的命令行。
Show Agents in output显示用于构建每个文件的 Agent。
Show Time in output显示每个文件的开始和结束时间。
Hide IncrediBuild Header in output抑制编译输出中的 IncrediBuild 头文件。
Internal IncrediBuild logging level重写此构建的内部 Incredibuild 日志级别。不影响输出或任何用户可访问的日志。主要用于在 IncrediBuild 支持人员的帮助下排除故障。
Set an Environment Variable设置或覆盖编译上下文的环境变量。
Stop on errors遇到错误时立即停止执行。这是 Visual Studio 构建的默认行为,但不适用于 Make and Build 工具或 Dev Tools 构建。
Additional Arguments连接到最终构建控制台命令行的参数。
Open Build Monitor打开一个 IncrediBuild 构建监视器,以图形方式显示开始构建后的构建进度。

IncrediBuild 清理步骤

使用 IncrediBuild 构建时,可以在Clean Steps 中为清理命令添加参数和目标。

构建错误和警告会被解析并显示在Issues 中。

另请参阅 "为项目激活工具包"、"添加清理步骤"、" 构建配置项目"、"为运行配置项目"、"打开项目"、"配置项目"和 "IncrediBuild"。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.