Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt Creator 7.0.2, Qt Creator 8.0.1, Qt Creator 9.0.2, Qt Creator 10.0.0, Qt Creator 12.0.0-beta2
-
None
-
-
b1876052b (master)
Description
I'm running QtCreator 7.0.2 with a cmake project on macOS.
Whenever cmake is run and an executable target that used to exists is removed, QtCreator removes the corresponding run configurations from the project.
I can see how that can be useful for the automatically created run configurations that weren't customized. But it's quite irritating when I've customized a run configuration (e.g. set up some command line arguments). For me it's quite frequent that targets change, for example when I switch between different feature branches with different sets of targets.
This would also happen when I rename a target in cmake. Instead of retaining the run configuration and manually updating the executable, I have to recreate it. Another case is when you are debugging your cmake configuration itself, and maybe temporarily commenting out some add_subdirectory or similar. When the cmake run succeeds, the corresponding run configurations are gone.
I think this is new behaviour. Maybe I'm wrong, but I seem to remember that in some earlier version the run configurations were kept (but the executable was shown in red when it didn't exist as a target). But I can't say which version this might have changed.
Is there some way to make QtCreator not automatically remove the run configurations? I checked in the settings, but didn't find anything that sounded related. If not, it would be great if this could be added.
Repro:
- Clone project from https://github.com/NikolausDemmel/cmake_demo
- Open Project in QtCreator
- Add run configuration for target foo (if not set up automatically; depends on your settings).
- Set some command line arguments.
- Comment out executable foo in CMakeLists.txt and run cmake
- Observe that run configuration for foo is gone.
- Remove comment again and run cmake
- Observe that run configuration for foo is still gone.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-23163 Qt Creator loses Run configurations when project outputs changes across build configurations
-
- Closed
-
-
QTCREATORBUG-32289 ProjectExplorer: Don't auto-remove manually added run configurations
-
- Closed
-
For Gerrit Dashboard: QTCREATORBUG-28273 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
476350,4 | ProjectExplorer: Add setting to not auto-remove run configurations | master | qt-creator/qt-creator | Status: ABANDONED | -1 | 0 |
488624,3 | ProjectExplorer: Do not auto-remove customized run configurations | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |