Creator/cmake: How to set build folder before any temporary files are written?
-
When I open a cmakelists-File as a new project and select the kit, Creator immediately start generating files in my source folder, before I can specify a different build folder.
How can I prevent that?
-
In the Kit selection page, you can click on Details and select the build directory.
Alternatively you can use CMake Presets to have control over the binaryDir. See https://www.qt.io/blog/qt-creator-9-cmakepresets for more details.
-
In the Kit selection page, you can click on Details and select the build directory.
Alternatively you can use CMake Presets to have control over the binaryDir. See https://www.qt.io/blog/qt-creator-9-cmakepresets for more details.
@cristian-adam
Do you mean the page "Build settings", section "CMake" item "Build directory"?Yes, that's where I can change it. But when I select the kit, Creator doesn't wait for me to specify a build directory. Since the default is the source folder, Creator immediately starts to pollute it with temporary files, before I have a chance to change the folder.
-
No. I mean the Kit selection dialog, which is popped up when your project is first configured. You can delete your
CMakeLists.txt.user
file to get this dialog.See below:
-
No. I mean the Kit selection dialog, which is popped up when your project is first configured. You can delete your
CMakeLists.txt.user
file to get this dialog.See below:
@cristian-adam
How do I get this view when I add a Kit to an existing project? -
You can do it in two ways:
- As written above, delete your
CMakeLists.txt.user
file after closing the project. Reopening the project will get you the dialog. - In the CMake settings dialog right click on the existing kits and click on Disable. When you disabled all of them, you will get the dialog.
- As written above, delete your
-
You can do it in two ways:
- As written above, delete your
CMakeLists.txt.user
file after closing the project. Reopening the project will get you the dialog. - In the CMake settings dialog right click on the existing kits and click on Disable. When you disabled all of them, you will get the dialog.
@cristian-adam
Thanks for elaborating.
I wish there was a pause button for all the background tasks Creator is doing :-) - As written above, delete your
-
Depending on your project, you can disable some plugins that will be triggered after a project is loaded. (Qml, Testing).
Feel free to open a feature request at https://bugreports.qt.io/