Disable cmake default "Debug" profile persistently and always
已回答
v2023.2
We use Cmake presets for all of our projects. When opening a Cmake project for the first time, CLion always applies a default Build, Execution, Deployment Profile called “Debug”. This profile always fails and creates an unwanted build directory in our source dir.
I have followed the steps in the CLion docs to configure “New Projects Setup” to remove the Debug profile. It keeps coming back.
I have followed the steps in the CLion docs to configure Advanced Settings to disable “Initial profile configuration…first time”. This sticks, but doesn't seem to do anything.
Anyone know how to force CLion to only use the CMake Presets in the CMakePresets.json file and not to make up some of its own??
请先登录再写评论。
Hello!
I did the following in CLion 2023.3.1: went to `File | New Projects Setup | Settings for New Projects`, selected `Build, Execution, Deployment | CMake`, removed the “Debug” profile from there, and clicked `OK`. After that, I closed the currently opened project in CLion (`File | Close Project`), chose `Open` on the “Welcome to CLion” screen, and selected a project with CMake presets that had not been opened in the program before (i.e., it didn't have the `.idea` subdirectory). As a result, there was no “Debug” profile when the project was opened:
Do these steps work differently on your side?
Yes, it does work the same for me. What I think is happening is I have to do this whenever I update CLion.
Not ideal, but not the end of the world, either.
Thanks!