Creator/cmake: How to set build folder before any temporary files are written?
-
wrote on 19 Dec 2022, 09:14 last edited by
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?
-
wrote on 19 Dec 2022, 09:37 last edited by
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.
wrote on 19 Dec 2022, 09:42 last edited by@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.
-
wrote on 19 Dec 2022, 14:30 last edited by
-
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:
wrote on 20 Dec 2022, 08:28 last edited by@cristian-adam
How do I get this view when I add a Kit to an existing project? -
wrote on 20 Dec 2022, 10:50 last edited by
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.
wrote on 20 Dec 2022, 11:10 last edited by@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
-
wrote on 20 Dec 2022, 11:12 last edited by
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/
8/8