I have a cmake
project that uses vcpkg
(I added vcpkg
as a submodule
under my repo and configured CMAKE_TOOLCHAIN_FILE
to point to the vcpkg.cmake
).
Now I configured CLion to connect over ssh
and build remotely on a different machine, but I am not sure how I can go about telling it to sync my vcpkg folder which is outside of the CMAKE_SOURCE_DIR
.
I tried also to put the vcpkg
submodule
in CMAKE_SOURCE_DIR
(even though I would like to keep it separate) and this works, it gets synced.
I was thinking also if there is some way to control where CLion does the sync
on the remote machine and I could just put vcpkg
there myself (relative to the sync path) and install the needed packages, but I did not find this option either.
OK, I found how to set the remote for my ssh connection path:
File | Settings | Build, Execution, Deployment | Deployment
So I can go myself on the remote machine, clone vcpkg
relatively to the Deployment
path and install all packages.
This works well enough, I just need to make remember to install any new packages in both places.
EDIT:
I found also a completely automated solution:
From the same CLion Deployment
settings, I can actually add multiple mappings
so I can add an extra folder sync for my out of source vcpkg
.
At the end, I am thinking that it will be a waste for CLion to keep the whole vcpkg
with all the installed packages automatically in sync when I can just sync it myself once in a blue moon when I install a new package.
I am not sure how expensive it would be for CLion to monitor such a big folder.