Clion is creating a file .idea/.name. What is this used for?
Answered
Clion is creating a file .idea/.name. What is this used for?
It seems to be a Cmake project name. And if the CmakeLists.txt has multiple projects in it, it's the last project.
The odd thing is that the "Recent Projects" list contains that name in the list. So if I have multiple repos with the same project name then it gets confused (and confuses me).
I have tried deleting it, but Clion recreates it. Which brings up the question of how to prevent this file from being created?
Note that Pycharm doesn't have this. It looks Clion specific.
Please sign in to leave a comment.
Hello!
This file stores the project name. The one that you see in the Navigation bar and in the “Recent Projects” list, for example.
In the case of CMake projects, the project name is taken from the “project()” command in the top-level CMakeLists.txt.
If several different projects have the same name, the "Recent Projects" list should show project paths:
There is no way to do that. A project can't not have a name.
Perhaps bad terminology on my part. I have several repos with similar cmakelists.txt like this one:
There are two “projects” named in the same cmake file.
Typically when I first start up Clion it lists as “running-average” in “recent projects”. And then it suddenly changes to “ut”. Note I run the unit tests using a script outside of CLion.
To narrow down what's happening I have tried this:
So for some reason the unit tests generate the .idea/.name but compiling/running the app doesn't.
> There is no way to do that. A project can't not have a name.
I have deleted the .idea/.name file in most of my repos and Clion displays the repo name (i.e. directory where the repo resides) in the title bar, and in the “recent projects” list just fine.
> the "Recent Projects" list should show project paths
You're right, thanks.