If your are running Clion on a Mac, all you have to do is rename the directory that contains your .cpp and .h and CMake files then in Clion go to open then to the new name of the directory and Clion automatically figures everything else out.
That is what I did. However before you open the new project which is the project you renamed. Clion will create a project directory with the original name and it will be blank so you will have to Delete that directory.
However, if you are using windows or other machines it may not be the same. Because, now that i look, i don't have and .idea file.
Now that i think about it. Maybe this is a new feature since the new update. I am not sure when the new update for jetbrain IDEs was released. So, maybe that is a new feature that was not around at the time of your original post.
CMakeLists.txt
, I'd suggest that you: 1) close the IDE. 2) rename the directory. 3) remove the.idea
folder. 4) import the renamed directory in CLion. The IDE still has some rough edges like the one you mentioned, but if you base your project's config on theCMakeLists.txt
file (I'm not a fan of the GUI config options), you should be able to fix quiet a few "glitches" by simply removing the.idea
directory and re-importing the project. – Zootomy