Qt Creator 7-CMake更新

Qt Creator 7 - CMake update

Qt Creator 7-CMake更新

 Thursday February 10, 2022 by Cristian Adam | Comments

​2022年2月10日星期四 克里斯蒂安·亚当 | 评论

Qt Creator 7 comes with an updated CMake project configuration settings page.

Qt Creator 7附带了一个更新的CMake项目配置设置页面。

Stop CMake button

停止CMake按钮

The first feature that I want to point out is the “Stop CMake” button. Previously it was possible to stop the “Configure” step by pressing the “x” button fo the “Configure” progress bar. 

我想指出的第一个特性是“Stop CMake”按钮。以前,可以通过按下“配置”进度条的“x”按钮来停止“配置”步骤。

Now it's as easy as clicking the "Stop CMake" button.

现在只需点击“Stop CMake”按钮即可。

Run CMake button and additional CMake options

运行CMake按钮和其他CMake选项

Now it is possible to run CMake to configure a project if it’s already configured. Previously this was only possible by setting new -D/-U<variable>. values.

现在,如果项目已经配置好,可以运行CMake来配置项目。以前,这只能通过设置新的-D/-U<variable>来实现。

You can also pass command line options to the CMake configuration step, options like: "--warn-uninitialized""--debug-find", and "--trace-expand".

还可以将命令行选项传递给CMake配置步骤,选项包括:“--warn uninitialized”、“--debug find”和“-trace expand”。

Initial Configuration and Current Configuration

初始配置和当前配置

The “Initial CMake parameters” edit field has been refactored as a CMake variables list, and the command line options are now part of the “Additional CMake options” edit field.

“初始CMake参数”编辑字段已重构为CMake变量列表,命令行选项现在是“附加CMake选项”编辑字段的一部分。

“Initial Configuration” list of variables contains the variables that are used to configure the CMake project for the first time. Some default values are inherited from the kit’s CMake configuration and are displayed in Italic.

“初始配置”变量列表包含用于首次配置CMake项目的变量。一些默认值继承自工具包的CMake配置,并以斜体显示。

The “Initial Configuration” list of variables is saved in the project’s source directory as  the CMakeLists.txt.user file.

变量的“初始配置”列表作为用户文件CMakeLists.txt.user,保存在项目的源目录中。

The “Current Configuration” contains the list of CMake variables that are present in the CMake file-api json export located at the .cmake/api/v1/reply directory.

“当前配置”包含CMake file-api json导出中,存在的CMake变量列表,该文件位于.cmake/api/v1/reply目录。

The variables that are inherited from the “Initial Configuration” are displayed in Italic. The mismatched values are displayed in red.

从“初始配置”继承的变量以斜体显示。不匹配的值显示为红色。

You might also notice that the grouping of the CMake variables is no longer there and that the view has alternating background colors for better visibility.

您可能还注意到,CMake变量的分组不再存在,视图具有交替的背景色,以获得更好的可见性。

Kit CMake configuration

套件的CMake配置

The kit’s CMake configuration is now easily accessible at the “Kit Configuration” button.

该套件的CMake配置现在可以通过“套件配置”按钮轻松访问。

This CMake configuration will be passed to the “Initial Configuration” as kit values, which then are passed to the “Current Configuration” as initial values.

该CMake配置将作为套件值传递给“初始配置”,然后作为初始值传递给“当前配置”。

Setting the -DQT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP:BOOL=ON CMake variable in kit will make sure that any project using this kit will have the Qt Creator's package manager auto setup skipped.

在套件中设置CMake变量-DQT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP:BOOL=ON将确保使用此套件的任何项目都将跳过Qt Creator的包管理自动设置。

帮助链接

You might have seen the “Additional CMake options” having a hyperlink. This hyperlink points to the offline CMake documentation, and if the installed CMake version doesn’t come with the CMake.qch file, the online documentation will be used.

你可能已经看到“附加的CMake选项”有一个超链接。这个超链接指向离线的CMake文档,如果安装的CMake版本没有与CMake.qch一起提供,将使用在线文档。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值