| 1 |
--- |
| 2 |
title: Comparisons |
| 3 |
... |
| 4 |
|
| 5 |
# Comparing Meson with other build systems |
| 6 |
|
| 7 |
A common question is *Why should I choose Meson over a different build |
| 8 |
system X?* There is no one true answer to this as it depends on the |
| 9 |
use case. Almost all build systems have all the functionality needed |
| 10 |
to build medium-to-large projects so the decision is usually made on |
| 11 |
other points. Here we list some pros and cons of various build systems |
| 12 |
to help you do the decision yourself. |
| 13 |
|
| 14 |
## GNU Autotools |
| 15 |
|
| 16 |
### Pros |
| 17 |
|
| 18 |
Excellent support for legacy Unix platforms, large selection of |
| 19 |
existing modules. |
| 20 |
|
| 21 |
### Cons |
| 22 |
|
| 23 |
Needlessly slow, complicated, hard to use correctly, unreliable, |
| 24 |
painful to debug, incomprehensible for most people, poor support for |
| 25 |
non-Unix platforms (especially Windows). |
| 26 |
|
| 27 |
## CMake |
| 28 |
|
| 29 |
### Pros |
| 30 |
|
| 31 |
Great support for multiple backends (Visual Studio, XCode, etc). |
| 32 |
|
| 33 |
### Cons |
| 34 |
|
| 35 |
The scripting language is cumbersome to work with. Some simple things |
| 36 |
are more complicated than necessary. |
| 37 |
|
| 38 |
## SCons |
| 39 |
|
| 40 |
### Pros |
| 41 |
|
| 42 |
Full power of Python available for defining your build. |
| 43 |
|
| 44 |
### Cons |
| 45 |
|
| 46 |
Slow. Requires you to pass your configuration settings on every |
| 47 |
invocation. That is, if you do `scons OPT1 OPT2` and then just |
| 48 |
`scons`, it will reconfigure everything without settings `OPT1` and |
| 49 |
`OPT2`. Every other build system remembers build options from the |
| 50 |
previous invocation. |
| 51 |
|
| 52 |
## Bazel |
| 53 |
|
| 54 |
### Pros |
| 55 |
|
| 56 |
Proven to scale to very large projects. |
| 57 |
|
| 58 |
### Cons |
| 59 |
|
| 60 |
Implemented in Java. Poor Windows support. Heavily focused on Google's |
| 61 |
way of doing things (which may be a good or a bad thing). Contributing |
| 62 |
code requires [signing a CLA](https://bazel.build/contributing.html). |
| 63 |
|
| 64 |
## Meson |
| 65 |
|
| 66 |
### Pros |
| 67 |
|
| 68 |
The fastest build system [see |
| 69 |
measurements](Performance-comparison.md), user friendly, designed to |
| 70 |
be as invisible to the developer as possible, native support for |
| 71 |
modern tools (precompiled headers, coverage, Valgrind etc). Not Turing |
| 72 |
complete so build definition files are easy to read and understand. |
| 73 |
|
| 74 |
### Cons |
| 75 |
|
| 76 |
Relatively new so it does not have a large user base yet, and may thus |
| 77 |
contain some unknown bugs. Visual Studio and XCode backends not as |
| 78 |
high quality as Ninja one. |