开发者

Including external C++ libraries in version control [duplicate]

开发者 https://www.devze.com 2023-01-03 03:42 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Storing third-party libraries in source control
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Storing third-party libraries in source control

I'm currently starting a project which is going to be developed on开发者_高级运维 a few different computer and I'm keeping in sync with bzr. In the project I'm using a couple of 3rd party libraries, like SDL. In the past I've just pushed a copy of the compiled library to my version control, but that usually seems to massively inflate the size of the branch and generally seem like a bad idea.

Is that the normal practice, just pushing the required libraries, or is there a better way of added libraries to distributed version control like bzr or git? (I know on svn you can use svn:external to do something similar to this)


Use git subprojects, and either reference from the 3rd party library's main git repository, or (if it doesn't have one) create a new git repository for each required library. There's nothing reason why you're limited to just one git repository, and I don't recommend you use somebody else's project as merely a directory in your own.


what we do, is have each client with its own copy of the library, and configure each IDE individually. Then we install a "dependencies patch" whenever the technical director changes things around.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号