我正在做一些跨平台的项目,使用CMake来配置不同构建系统的项目。这种方法的缺点是需要在每个平台上构建依赖项和子项目。我将经典的主干-分支-标签结构(当时我正在使用subversion )修改为:
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因此,开发人员可以简单地检查必要的开发分支并进行开箱即用的构建。他还可以签出主干,如果他有预先构建的库和必要的依赖项,CMake会找到它。
有没有人在这个问题上挣扎过?用mercurial解决问题的更好的方法是什么(我不确定对不同的构建系统使用分支和主干子存储库是mercurial的好解决方案,也不确定为每个构建的系统都包含预构建库是正确的)?
发布于 2011-03-21 21:37:18
研究一下Mercurial Subrepos,他们就是这种设置的解决方案。
https://stackoverflow.com/questions/5378289
复制相似问题