How to regenerate the cmake target list of buildable targets?
Answered
I mean the list under that widget
I removed each target manually and now I can't regenerate it from scratch. I tried to remove .idea and cmake-build-* directories, and Unload CMake project. No luck
I managed to regenerate it with prior closing of the IDE and then removing .idea folder. Is there a way to do it without such a pain? Removing .idea folder causes all project-wide settings to wipe out completely
Please sign in to leave a comment.
I use "Tools -> CMake -> Reset Cache and Reload Project" after any major changes to cmakelists files and it seems to catch up with all my changes nicely, including updating any added or removed subdirectory projects.
It does cause a complete 'clean' though I think (I assume 'Reset Cache' means 'delete cmake cache dir'?). There are some other options in the same submenu that probably don't delete cmake cache so you might want to try them, but I find sooner or later I generally end up having to do this eventually anyway when cmake gets too confused.
Hi IC!
CLion will not create a new default configuration if the same configuration has already being created. That's why in your case the manually deleted configurations are not regenerated automatically. The only way to generate them automatically in this case is to delete the .idea subfolder as you did.
I managed to regenerate configurations by closing the CLion, then opening the .idea/workspace.xml, and then removing XML element
After that, I opened CLion, and clicked Reload CMake Project.
I swear to god JetBrains products are starting to frustrate me to no end.
It's little things like this, and also leaving issues for basic functionality open for years with no fix in sight that I'm starting to look for alternatives.
A paid software shouldn't be worse to use than free alternatives. Even worse, a dedicated IDE for a specific language, not even having the ergonomics to support that language well is a complete joke.
Anyway, you also have to delete `<component name="CMakeRunConfigurations">` in .idea/workspace.xml for it to work.