Billy ONeal
Billy ONeal

Reputation: 106540

How does one handle big library dependencies in source control?

My C++ application depends on Boost. I'd like someone to just be able to check out my repository and build the whole thing in one step. But the boost distribution is some 100MB and thousands of files, and it seems to bog down source control -- plus I really don't need it to be versioned.

What's the best way to handle this kind of problem?

Upvotes: 4

Views: 464

Answers (2)

CesarGon
CesarGon

Reputation: 15335

I've found the book "Large-Scale C++ Software Design" by John Lakos very useful as far as organising large C++ projects is concerned. Recommended.

Upvotes: 0

Kissaki
Kissaki

Reputation: 9217

Most version control tools/systems provide mechanics to add references to other repositories into your repository.

This way you can keep your repository clean from files of other repositories but still be able to just point to the correct library and version.

In Git it’s called submodules. In SVN it’s called externals.

In the end you’ll have to decide on whether you want to include the files into your repo so others won’t have to checkout the other repos as well, even when the references (submodule/external) make just that pretty easy. I’d prefer a clean repo though and reference other repositories, if available. This will also make maintaining and upgrading those libraries a lot easier.

Upvotes: 1

Related Questions