QtCreator - run CMake
-
Hello,
recent QtCreator versions (4.0.82) don't support user-defined CMake parameters when opening a new project. I used to click on 'Configure project' and then QtCreator would display a window with a title 'Run CMake', where I could supply extra CMake arguments. The recent behaviour is that QtCreator runs CMake directly (without asking me to provide extra parameters) and sets default values as it sees fit. The 'run cmake' dialog disappeared, which is really annoying - I used to copy and paste a series of CMake variables with predefined values directly in this dialog. Is there any plan to bring this back? Thank you.
Best regards,
Martin
-
HI and welcome to devnet,
Go to the Project panel, under build you can edit your variables.
For more information, take a look at "Setting Up a CMake Project" in QtCreator's documentation.
-
Hi,
yes, I'm aware of that, but this is really tedious (imagine a large number of cmake variables where you have to set paths manually). What was wrong with enabling the user to paste a set of variables and their values in one shot? Does this mean that this 'workflow option' is gone forever? I would really prefer to define some variable values at first cmake run instead of having to change them manually after the initial cmake run.
-
You can add common default values to your kits in Tools>Options>Build & Run>Kits. Those apply to all projects using that kit.
Project specific options can indeed only be set via the Projects page now. I hope that many users can actually make cmake pick sensible default values for most settings. That reduces your need to have many settings and helps all your project's users as well.
-
I really regret that you made this choice. It is difficult to preset 'reasonable default values' when those values are for example numerous paths to third-party libraries on machines where I am not administrator and I have no control over the naming and location of these libraries. In addition, the new behavior of Qtcreator means that the CMake cache first gets populated by (wrong) default values before the user gets a shot at touching it. This is not really how CMake behaves on command line (where you can use -D...) and going further away from that behavior is a strange decision. The 'run cmake' dialog certainly would not interfere with the new strategy of QtCreator (you can just choose to skip the 'Run CMake' part, right?), and I don't really understand the reasoning behind the removal of this (perfectly functioning) feature. In my opinion, this is hardly an improvement, but maybe I just fail to see the reasoning ...