c + +构建系统 [英] C++ build systems
问题描述
我将开始一个新的C ++项目很快(它可能有一些C组件以及)和我正在寻找一个现代的,工业强度(即非测试)构建系统。该软件将通过几个开发商在3 - 5年内创建,将在Linux(的Mac OS X和Windows的可能的后面支持)运行。我要寻找的东西,有更好的融为一体prehensibility,易于使用和维护比例如制作
,但仍然足够强大,以处理复杂的项目。开源软件是preferred。
I will start a new C++ project (it may have some C components as well) soon and I am looking for a modern, industrial-strength (i.e. non-beta) build system. The software will be created by several developers in 3-5 years and will run on Linux (Mac OS X and Windows might be supported later). I am looking for something that has better comprehensibility, ease-of-use and maintainability than e.g. make
but is still powerful enough to handle a complex project. Open source software is preferred.
我开始寻找到 Boost.Build
, CMake的
,的Maven
和 SCons的
到目前为止,喜欢的功能和所有这些概念,但我缺乏经验,使一个大型项目的决定。
I started looking into Boost.Build
, CMake
, Maven
and SCons
so far and liked features and concepts of all of those, but I'm lacking the experience to make a decision for a large project.
推荐答案
我用 SCons的一年多了,现在,它的真的很酷。它是一个完整的构建系统,而不是构建脚本生成。
I've used SCons for over a year now and it's really cool. It's a full build system, not a build scripts generator.
它是基于Python的,和你写的SConstruct和SConscript在Python(Makefile中的等价物),它允许你打电话给你可能想要什么一个Makefile授权任何可用的库和一个更清晰的语法。
It's Python based, and you write the SConstruct and SConscript (equivalent of Makefile) in Python which allows you to call any available library you may wish for and a much clearer syntax that what a Makefile authorize.
由于Python是跨平台的,所以是SCons的,有没有问题。
Since Python is crossplatform, so is SCons, no problem there.
它捆绑了好多个目标:
- 检测二进制文件提供自动映射一些扩展朝着正确的二进制文件
- 检测到依赖于操作系统的对象/库正确的扩展名,但你可以重写它
- 为常用操作提供设施(编译后的延迟),如移动,复制,焦油,你可以提供自己的Python脚本和钩它们
- 开箱的,但提供的自定义许多挂钩在各个层面
这是真正有效的,甚至提出了先进的功能(如存储preprocessed文件的散列在一个SQLite数据库,而不是使用时间戳),即使你决定你的最终战略。
It's really efficient, and even proposes advanced features (like storing a hash of the preprocessed file in a sqlite db instead of using the timestamp) even though you decide of your strategy in the end.
它还提供了依赖周期检测免费的(东西,绝对不来生成文件)和接口一般只有更好/自动。
It also offers dependencies cycle detection for free (something that definitely does not come with Makefiles) and the interface is generally just better / automated.
我说了这是有效的?那么它显然允许在并行执行多个作业;)
Did I say it was efficient ? Well it obviously allows for multiple jobs to be executed in parallel ;)
和它也是免费的,就像免费的饮料,随意作出贡献;)
And it's also free, like in free drink, feel free to contribute ;)
我只能推荐它。
这篇关于c + +构建系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!