Question

I have split my project into several subprojects But all have a common part (directory with cmake scripts). Moreover some subproject need to include other subprojects (libraries).

I would prefer to use git submodules but as far as I know they have a limitation that a submodule needs to be in a separate directory in the repo (does it?) what ties my hands a little as I don't want to duplicate any source or cmake scripts in a superproject or any of subprojects.

How do you propose to solve it ?

Was it helpful?

Solution

I don't see the problem. Your libraries should not be submodules at all, but totally separate projects. If you do want to make them submodules, they will certainly want to be in their own directories. As for the cmake scripts, you say that they are already in their own directory, so making that directory a submodule is not a problem. Perhaps you need to clarify the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top