Qt 6.4 is out now! Scale your UX to the next level with the all-new 3D physics engine and Qt for WebAssembly. Read more.
最新版Qt 6.3已正式发布。 了解更多。
最新バージョンQt 6.3がご利用いただけます。 詳細はこちら

Qt Creator 7 - CMake update

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

Stop CMake button

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. 

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

qtc7-stop-cmake

Run CMake button and additional CMake options

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.

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

qtc7-run-cmake

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.

“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.

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

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.

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.

qtc7-initial-current

Kit CMake configuration

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

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

qtc7-kit-configuration

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.

Help links

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.

qtc7-help

 


Blog Topics:

Comments