How can this remote model work"

已回答

Is it possible to use CLion to sync source files with a remote Linux target, without bothering with any cmake toolchain? 

I just joined a project where development is typically done on a Linux VM running on a server, with only shell access. The project is a makefile project (not cmake), and building is done in a chroot environment. I'd prefer to have the advantages of Windows GUI tools for git and editing, and exploring how CLion can help me.

When I look up documentation on remote development, it assumes I have, or will use, a cmake project on the target. What I hope would work would be that I can use git and CLion locally (Windows), tell CLion how to ssh into the VM and instruct it to keep the source files synced as I edit files, and then I would separately ssh into the remote VM to enter the chroot jail and run the project's makefiles. Can CLion work that way? Or, can it do more for me than I know about?

Thank you. 

 

1

Hello!

So far only CMake projects can be used in the full remote mode in CLion - https://www.jetbrains.com/help/clion/remote-projects-support.html.

Right now we are working on supporting the full remote mode for Makefile projects - https://youtrack.jetbrains.com/issue/CPP-20695. Feel free to comment or upvote the issue in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

Meanwhile the only thing I can suggest for Makefile projects is to use the deployment features - https://www.jetbrains.com/help/clion/uploading-and-downloading-files.html. 

0
Avatar
Permanently deleted user

Thanks!

Is this why, when I select a variable and want to find references for it (Alt+F7), it finds no references? Is a makefile or cmake required to populate the references?

CLion would still be useful for me as a source code navigator/understander/editor if I can find references to variables, header files, etc, but if it can't do that for me because it can't make the project, that severely limits CLion's usefullness for me.

 

0
Avatar
Permanently deleted user

I'll add, that for full remote mode for Makefile projects to work in my environment, it also needs to support first entering a chroot jail as root and changing directories to find the makefile and build it.

0

>if it can't do that for me because it can't make the project

That's exactly the reason. C++ is the language which parsing/resolve requires some extra knowledge like compilation flags, header search paths, etc. This information is stored in the project model and has to be extracted from there. W/o this info the code can be broken by a simple refactoring affecting the whole project. So the build system integration is basically essential for truly smart code features.

0

请先登录再写评论。