How to regenerate the cmake target list of buildable targets?


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

评论操作 固定链接

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.