[Qt-creator] CMake support change in master branch

Tobias Hunger Tobias.Hunger at qt.io
Tue Jun 9 18:55:47 CEST 2020


Hello everybody,
 
I just pushed a patch to the master branch that changes how CMake projects are handled. I expect this patch to still have some rough spots, so please avoid to update for a while if you want a polished experience, but I do hope for bug reports and feedback about the changes!


The idea of this change is to reduce the magic that Creator does when configuring CMake projects.


You can now specify a set of "Initial CMake arguments", that are going to get applied when a build directory is unconfigured (== does not contain CMakeCache.txt yet).
These are populated based on the selected kit, but will not change automatically when you update your kit. I want to add a warning when that happens, but that does not exist yet. Any CMake command line argument can be provided, so you can now ask for warnings to be enabled/disabled or whatever else is supported by CMake.

When you change CMake configuration in Creators Project mode, then cmake will be run with exactly those changes and nothing more.

In all other cases CMake will be run without *any* configuration-related arguments.


Creator will no longer store any configuration changes in its .user file anymore (anything that exists there is moved into the initial arguments instead). The sole truth about CMake configuration is the CMakeCache.txt file. This also means that swiching build directories will result in a loss of configuration, something that we tried to avoid earlier. I think overall this is an acceptable cost, considering that Creator did not do a great job at it in the first place:-)

This also makes the dialog about the CMake configuration and the Creator configuration unnecessary and that has been removed. Considering how many complaints I had about it, I expect nobody will miss this one;-)


As said before: Please send feedback via the bug tracker or by email! I hope to sort out the remaining rough spots in the next couple of weeks.

Best Regards,
Tobias

--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list