CLion Remote Build - Run without source syncing? Follow
I have a project I am developing on OSX but which requires a specific (linux hosted) build and run environment.
I have this environment running inside of docker.
I am able to run my build via a remote deployment / remote toolchain.
One thing that is very inconveinient is the need to sync my sources via SFTP. I already have my sources mounted inside of the docker environment. Is there any way to configure my remote toolchain to just use the source files I have already mounted instead of syncing?
Please sign in to leave a comment.
FYI For anybody reading this. I was able to get this going by
1. Setting up a my mapping via SFTP
2. Excluding all files from being uploaded
3. Setting up symlinks inside my docker container such that I have a source path inside of it identical to my host machine
4. Setting cmake to generate to a non-relative path outside of the source directory root
This results in the builds executing on the remote host but all explicit source syncing being skipped and works well!
Also feel free to comment or upvote a related feature request: https://youtrack.jetbrains.com/issue/CPP-14584.
Here's the ticket connected to "docker support" in CLion remote-mode: https://youtrack.jetbrains.com/issue/CPP-13751
Feel free to share your case in comments.
I cannot get this to work. I have same dir in container and local (container mounts the local dir in the same place), but it wants to sync some dirs anyway, including the cmke-build-debug-local-container dir, which has tons of stuff in it...
Also, it still seems to ty to sync my compiler dires, even though those are also mapped to equivalent directories
At the moment we don't have special support for docker, in particular for mounted docker volumes.
It means that for now there is no official way to skip synchronization step.
How cal I get it to at least use "--links" when using rsync so that it doesn't make several copies of the tree whenever there's a symbolic link? This behavior is actually what led me to use a local container because the sync was unusable remotely due to this behavior.
Am I right that it makes several copies while uploading project to remote host? If so, unfortunately we don't use rsync on this step, as result `--links` option won't help.
yes. unfortunately i have been forced to be using vscode for remote development due to this. I hate vscode, but I have no choice. a project that i can git clone in 30 seconds takes three hours to “upload” and then after every build, takes a ridiculously long time to be able to build or run/debug again. it’s basically impossible to iterate. i have to Admit that vscode really has the remote development down, but i understand they’re basically a web app anyway.
I had the same problem as Cjolivier01, and I'm forced to use VSCode as well. I gave CLion a good chance with remote development, but it's cumbersome to setup and fairly slow when working.