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

0

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:

It means that your project should be based on one of these formats so that you could work with it in CLion.

0
Avatar
Permanently deleted user

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?

0

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.

0
Avatar
Permanently deleted user

yes there is, and its content:

cmake_minimum_required(VERSION 3.16)
  project(tau_swp_fnl C)
   
  set(CMAKE_C_STANDARD 90)
   
  add_executable(tau_swp_fnl main.c)
0
Avatar
Permanently deleted user



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.

0

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`.

0

请先登录再写评论。