windows - How to effectively use git repositories / submodules for a C++ product that has many dependencies? -


i'm new git , still figuring things out... think i'm understanding whole branching/merging aspects. i'm still not sure best solution handling project dependencies are. best practice? has got common problem , yet can't find tutorial or best practice on doing this.

suppose have c++ product depends on several other c++ libraries, making complicated dependency graph. libraries like: other internally developed c++ libraries, public open source libraries, off-the-shelf closed source libraries

the final c++ product's source code relies on output of dependencies in order compile. these outputs composed of:

  • a series of c++ header files (notice c++ implementation files absent)
  • a set of compiled binaries (lib files, dll files, exe files, etc)

my understanding should put each library own repository. sounds git's submodules looking for. write-up @ http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ in particular seems introduction , can almost understand. example, have master project repository refer specific external git repository submodule / dependency. c++ code can "#include" header files in appropriate submodule directories. build script included master product / repository conceivably proceed recursively compile submodules.

ok question:

how typically cache binaries each repository? of our dependencies take hours compile , aren't updated on frequent basis. above scheme, might clone / check out high-level project server fix small bug. understand it, i'm forced clone thousands of files make each of these open source dependencies - i'm worried take time (especially on windows). worse, wouldn't forced recompile each , every submodule, if nobody has changed submodule months? (it seems kind of local "hash table" scheme on each developer computer links changeset id set of compiled binaries handy...)

(a previous shop worked @ few years ago used mercurial - extent of , all code - internal projects, etc. rolled 1 single big giant repository, , had build everything in big fat monolithic build script when cloning newly-created branch server. when done fix / new feature , had merged upstream, deleted local repository particular branch.)

we're doing development on windows, branch out other non-microsoft platforms - portability important.

normally bad idea, why don't check binaries submodules compiled code submodules don't change often? way, fetch pull down bins, , when compile new version of dependency changed binaries, see binaries show in git status output.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -