pros & cons of Meson,CMake, Autotools and Tup

referrence: http://stackoverflow.com/questions/5837764/autotools-vs-cmake/24953691

I am developing on Linux, using make as project build system, when checking out the gstreamer examples, I know meson, and search some ideas to share with you.

Meson

Pros:

  • The DSL does not get in the way at all. In fact, it is very nice and familiar, based in python.
  • The objects are all strongly typed: you cannot make string substitution mistakes easily, since objects are entities such as ‘depencency’, ‘include directory’, etc.
  • It is very obviuos how to add a module for one of your tools.
  • Cross-compilation seems more straightforward to use.
  • Really well-thought. The designer and main writer of Meson knows what he talks about very well when designing a build system.
  • Very, very fast, especially in incremental builds.

Cons:

  • Not as mature as CMake, though, I consider it already fully usable for C++.
  • Not so many modules available, though, gnome, qt and the common ones are already there.
  • Project generators: seems VS generator is not working that well as of now. CMake project generators are far more mature.
  • Has a python3 + ninja dependency.
  • The documentation is not great, but well… none of the ones below are either.

Cmake

Pros:

  • Generates projects for many different IDEs. This is a very nice feature for teams.
  • Plays well with windows tools, unlike autotools.
  • Mature, almost de-facto standard.

Cons:

  • Needs cmake installed.
  • It does not follow any well known standard or guidelines.
  • Documentation is not too good.
  • No uninstall target.

Autotools

Pros:

  • Most powerful system for cross-compilation, IMHO.
  • The generated scripts don’t need anything else than make, a shell and, if you need it to build, a compiler.
  • The command-line is really nice and consistent.
  • A standard in unix world, lots of docs.
  • Really powerful command-line: changing directories of installation, uninstall, renaming binaries…
  • If you target unix, packaging sources with this tool is really convenient.

Cons:

  • It won’t play well with microsoft tools. A real showstopper.
  • The learning curve is… well… But actually I can say that CMake was not that easy either.
  • About the learning curve, there are two very good sources to learn from:

The website here
The book here
The first source will get you up and running faster. The book is a more in-depth discussion.

From Scons, waf and tup, Scons and tup are more like make. Waf is more like CMake and the autotools. I tried waf instead of cmake at first. I think it is overengineered in the sense that it has a full OOP API. The scripts didn’t look short at all and it was really confusing for me the working directory stuff and related things. At the end, I found that autotools and CMake are a better choice. My favourite from these 3 build systems is tup.

Tup

Pros:

  • Really correct.
  • Insanely fast. You should try it to believe it.
  • The scripting language relies on a very easy idea that can be understood in 10 minutes.

Cons:

  • It does not have a full-featured config framework.
  • I couldn’t find the way to make targets such as doc, since they generate files I don’t know of and they must be listed in the output before being generated, or at least, that’s my conclusion for now. This was a really annoying limitation, if it is, since I am not sure.
  • All in all, the only things I am considering right now for new projects is, in this order, CMake and Autotools, since I need windows support most of the time. When I have a chance I will try tup also, but it lacks the config framework, which means that it makes things more complex when you need all of that stuff. On the other hand, it is really fast.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值