what is a correct include_directories for remote target?
已回答
remote development is there local Win10, remote RHEL6,
remotely all works fine.
locally no build and required code navigation only.
so no libs , just includes .
I've tried various cases, really it works only if:
- "include" is a subfolder of the project. no absolute or relative paths works if headers are located somewhere else
- path works inside include_directories statement only, predefined variables don't work.
it's very useless to copy whole header directory into subfolder of the project.
any idea please what is a correct setting the folders for local indexing and IDE navigation only?
P.S. the project is not huge or complex, just 5 sources and headers on one level and ~10 .so libs for a linking.
请先登录再写评论。
Hi! Actually, CLion synchronizes header search paths with all the content from the remote machine to the local client in order to resolve your code correctly. For example, even though standard library headers are taken from the target, you can navigate to them as if you were working locally in the CLion editor.
So you need to have your includes on the remote host and CLion will transfer them to the local client.
Note that starting with CLion 2019.1 the header search paths synchronization is performed only when triggered manually, by calling Tools | Resync with Remote Hosts. You can use the clion.remote.resync.system.cache registry option (Help | Find Action, type "Registry...") if you would like the synchronization to be triggered on every CMake reload. Please see https://blog.jetbrains.com/clion/2019/03/clion-2019-1-rc/ for more details.
thank you for the detailed explanation.
yes, it works fine
do I understand this right that I prepare target (remote) environment , including headers, libs , etc. and prepare the project itself locally?
so the project will be (auto) uploaded to remote host, in other hand I can start "resync" which copies all headers from project paths to backward direction - to local host, correct?
is there option to prepare remote environment which includes the project as well as required libraries?
I mean the option like "create remote project fully from remote content" and download the project files too?
Just an extra question about remote development :)
I see "upload" option for files/folders from project tree , but no similar command from the tree of remote host browser to download files/folders to local machine. I see similar IDEA documentation - looks like this option exists there, is CLion limited with this?
In the current implementation sources should be originally located on a local machine, CLion will automatically synchronize them to a remote host. Opening a remote project (a project located on the remote host) isn't implemented yet - https://youtrack.jetbrains.com/issue/CPP-14584.
>Just an extra question about remote development :)
I have both "Upload here" and "Download from here" options in the Remote Host tool window:
THanks a lot. I see my problem - I've tried to download out of project folder, just some folder from remote host explorer. Really project mapped folder works fine