auto init cmake-build-debug without creating a new project
已回答
whenever I create a new project, cmake-build-debug is auto inited and I can run the program without the pain of configuring running environment. However whenever I clone an existing project with clion, the cmake-build-debug is not created thus I need to reconfigure the running environment, Is there a shortcut that will allow me to create this folder and the running configuration automatically?
Thanks
请先登录再写评论。
Hello!
The cmake-build-debug folder is created only if you open a CMake project in CLion.
CLion does not provide its own project model for your code but supports the following formats:
Gradle (only the new Gradle C/C++ projects)
It means that your project should be based on one of these formats so that you could work with it in CLion.
My problem is that when I immigrate to different computer I need to init it locally so this folder will be inited for the current computer. Is there a way to create this folder for the new computer? Without starting a new project?
Is it a CMake project? Does it contain the CMakeLists.txt file? If you copy the project which contains the CMakeLists.txt file to a new computer and open it in CLion, CLion will create the cmake-build-debug folder when the project is loaded.
yes there is, and its content:
I try to clone the project with git, and what I got is the folder from the previous computer. which of course, wasn't runnable; as it was from a different platform.
Actually you shouldn't put the cmake-build-debug folder under version control. It should be marked as ignored by VCS.
In your case you can do `Tools | CMake | Reset Cache and Reload Project`.