Context
I have a remote server with C++ code and Makefile
, and I want to use Clion’s remote development + Makefile plugin to develop a Makefile project in remote.
I have mostly been following this guide from Jetbrains to set up remote development.
I have followed all the instructions:
- install Makefile plugin
- set up Remote Host in Build, Execution, Deployment | Toolchains ( there was no problem setting up the remote host )
- create corresponding CMake profile in Build, Execution, Deployment | CMake and selected the created Remote Host in the Toolchain
- set mapping to my newly created C++ Cmake project to the remote directory under Build, Execution, Deployment | Deployment | Mappings.
Problems with setup
After following all the instructions, I have two issues:
-
My local project and remote repository are out of sync. My local contains dummy files created on project initialization:
cmake-build-debug
directory,CMakeLists.txt
, andmain.cpp
, while my remote contains code andMakefile
. -
There is no configuration created for me to run and build. In the top-right corner where there is
run
,debug
andbuild
buttons, no pre-created configuration is shown. Instead, there isAdd Configuration
button. When I clickAdd Configuration
and navigate to create new Makefile configuration, there is no option for me to set up project in remote.
Question
So my question is:
- Do I need
cmake-build-debug
directory andCMakeLists.txt
even if I am only going to use the Makefile plugin to build and run? If not, how should I sink my files with remote? - How can I create debug and run configuration with Makefile s.t. it will only build and run on the remote host I have set up?