Mercurial, dependencies, repository structure
I am working on some cross platform project and use CMake to configure project with different build systems. The disadvantage of this approach is the need of dependencies and subprojects built on each platform. I modified classic trunk-branch-tag structure (I was on subversion then) to the following:
trunk/
data/
test/
sources/
...
branches/
branch-A/
branch-B/
...
tags/
tag-1.0/
tag-1.1/
...
workspace/
msvs_2008/
3rdParty/ - (contains开发者_开发技巧 precompiled libs, e.g boost)
external-lib-1/ - (external library-1 source)
external-lib-2/ - (external library-2 source)
project/ - (external to the trunk)
CMakeLists.txt - (configures this stuff together)
generic/ - (for linux, 3rdParty libraries installed using package manager)
external-lib-1/
external-lib-2/
project/
CMakeLists.txt
msvs_2010/ - (experimental)
3rdParty/
external-lib-1/
external-lib-2/
project/
CMakeLists.txt
So developer can simply checkout the necessary development branch and build out of the box. He can also checkout trunk and if he has prebuilt libraries and necessary dependencies CMake will find it.
Has anyone struggled with this problem? What is the better way to solve problem with mercurial (I am not sure that using branches for different build system with trunk subrepository is the good solution with mercurial, and not sure that including prebuild libraries for every built system is right)?
Look into Mercurial Subrepos, they're the solution for this sort of setup.
精彩评论