How to add additional directories to RSYNC used in Remote Linux Development using CMAKE

Prangon Das 0 Reputation points
2023-09-06T18:21:46.2733333+00:00

I have a folder structure as shown below. When I refer to project I mean in the CMAKE sense.

Root folder:

--Project A Root:

----CMakelists.txt

----CMakeSettings.json

----Target (executable) Root:

------src

--Project B Root:

----CMakelists.txt

----CMakeSettings.json

----Target (Executable) Root:

------src

--Common Libraries:

----Target C (shared Library) Root:

------CMakelists.txt

------src

----Target D (static Library) Root:

------CMakelists.txt

------src

Project A needs both Target C and Target D to build and run. Project B is the same with the executable being different.

If I open Project A's root using open folder of Visual Studio and connect to a remote Linux machine, RSYNC syncs up the Project A's root which includes the source. It does not sync up target C and D. So when I go to generate for Project A, CMAKE complains that it cannot find target C and D's folders.

Question: Is there a way to add Target C and D's folders to the RSYNC setup in the CMakeSettings.json of Project A? I want RSYNC/Visual studio to keep the necessary source for a project synced (regardless of its location) with its Linux version from Windows.

The folder structure cannot change. I cannot create a root folder that encompasses both Project A and the Common Projects library and open that because I want Project A and B to be separate.

I also have tried adding to the RSYNC command arguments in CMakeSettings.json and that did not work.

Thanks!

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-09-07T03:38:36.45+00:00

    Hi @Prangon Das

    Welcome to Microsoft Q&A! 

    The tag “Visual Studio” is related to general questions of Visual Studio IDE.

    Your issue is more related to CMake, please report it in dedicated CMake forum.

    Thanks for your understanding! 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.