Autocompletion not available when using remote host

已完成

Hi

I am working on Mac but I have build a linux Docker container so that I can build my source on the container but I do the development locally. The reason being I need Pistache and it is only for linux. Now building it works properly from within CLion but since Pistache is build in the container using ExternalProject_Add() in CMakeLists.txt but somehow it does not find the include files and there is no autocompletion in the editor. I have included in the CMakeLists.txt the include path as shown below and setup remote host in the IDE but autocompletion does not work:

 

include_directories(${CMAKE_BINARY_DIR}/thirdparty/include")

 

Here is an image in the editor showing that the include files are not found  

 

 

Building it from within CLion on the container works fine it is just the include paths are not resolved. Is this possible to work or I am trying to do something that is not possible?

 

 

0

Hello! Do i understand correctly that Pistache headers are generated in the CMake generation path (cmake-build-***, where *** is the name of the remote CMake profile) on the remote host when you build the project? Are they synchronized to the local machine (do you see them on the local machine)? What CLion version do you use?

0
Avatar
Permanently deleted user

I forgot about this but I actually found a work around for it.

Yes they are build on the remote machine so they are not available locally. I expected that since it is a remote build it will use the remote environment rather the local one. The way I fixed it is that I mounted the remote folder locally, where Conan installed the libraries and autocompletion works. I needed to do this as I have Mac but required to develop on Linux.

 

CLion version used is 2018.3.4

 

0

Actually, CLion transfers header search paths with all the content to the local host for the purpose of correct resolve.

Thanks for sharing the solution!

0
Avatar
Permanently deleted user

Hi Anna

Thanks for the reply and it does actually. Looks like something that was added in the latest version as I had an older one that didn't look that it did and I just upgraded two days ago. Brilliant! :)

0

Note that starting with CLion 2019.1 RC the resync 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.

0

请先登录再写评论。