CLion not copying sobmodule sources to remote machine

I've configured CLion for remote build and debug of a C++ project. Host computer is Windows 11, remote is a virtualized Ubuntu 22.04 LTS Linux machine.

CLion copies the main project sources to a temporary folder in the Linux machine (configured in Build, Execution, Deployment >> Deployment / Mappings), but does not copy source files I have as part of my project in the form of submodules (added with git submodule add ….etc…). 

The submodules code is in the local folder, downloaded from the git repo using git submodule update …etc….

The project structure is similar to this:

\ myProject
    - myLib
        - src/...etc...
        - CMakeLists.txt
    - submodules
        - mySubmodule
            - src/...etc...
    - CMakeLists.txt

The root CMakeLists.txt includes the inner CMakeLists.txt with add_subdirectory(myLib).

myLib's CMakeLists.txt includes the source files from mySubmodule in one add_library(…etc…) command.

If I download this repository to a local path in my Linux machine I can compile it with no issues from the command line.

How do I configure CLion to copy/sync the local submodules content to the remote temporary folder in the remote Linux machine?



Please sign in to leave a comment.