from small one page howto to huge articles all in one place

search text in:

Which filesystem do you use?

poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs






average rating: 1.7 (85 votes) (1=very good 6=terrible)

May 25th. 2007:




why adblockers are bad

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels






average rating: 1.3 (28 votes) (1=very good 6=terrible)

April, 26th. 2006:

You are here: manpages


Section: User Commands (1)
Updated: September 2017
Index Return to Main Contents


meson - a high productivity build system  


Meson is a build system designed to optimize programmer productivity. It aims to do this by providing simple, out-of-the-box support for modern software development tools and practices, such as unit tests, coverage reports, Valgrind, CCache and the like.

The main Meson executable provides many subcommands to access all the functionality.


The setup command

Using Meson is simple and follows the common two-phase process of most build systems. First you run Meson to configure your build:

meson setup [ options ] [ source directory ] [ build directory ]

Note that the build directory must be different from the source directory. Meson does not support building inside the source directory and attempting to do that leads to an error.

After a successful configuration step you can build the source by running the actual build command in the build directory. The default backend of Meson is Ninja, which can be invoked like this.

ninja [ target ]

You only need to run the Meson command once: when you first configure your build dir. After that you just run the build command. Meson will autodetect changes in your source tree and regenerates all files needed to build the project.

The setup command is the default operation. If no actual command is specified, Meson will assume you meant to do a setup. That means that you can set up a build directory without the setup command like this:

meson [ options ] [ source directory ] [ build directory ]



print version number
print command line help


The configure command

Mesonconf provides a way to configure a Meson project from the command line. Its usage is simple.

meson configure [ build directory ] [ options to set ]

If build directory is omitted, the current directory is used instead.

If no parameters are set, mesonconf will print the value of all build options to the console.

To set values, use the -D command line argument like this.

meson configure -Dopt1=value1 -Dopt2=value2


The introspect command

Meson introspect is a command designed to make it simple to integrate with other tools, such as IDEs. The output of this command is in JSON.

meson introspect [ build directory ] [ option ]

If build directory is omitted, the current directory is used instead.



print all top level targets (executables, libraries, etc)
print the source files of the given target
print all files that make up the build system (, meson_options.txt etc)
print all unit tests
print command line help


The test command

Mesontest is a helper tool for running test suites of projects using Meson. The default way of running tests is to invoke the default build command:

ninja [ test ]

Mesontest provides a richer set of tools for invoking tests.



run tests as many times as specified
run tests under gdb
list all available tests
invoke all tests via the given wrapper (e.g. valgrind)
Change into the given directory before running tests (must be root of build directory).
run tests in this suite
do not run tests in this suite
do not split stderr and stdout in test logs
run benchmarks instead of tests
base of file name to use for writing test logs
how many parallel processes to use to run tests
do not redirect stdout and stderr
a multiplier to use for test timeout values (usually something like 100 for Valgrind)
use the specified test setup


The wrap command

Wraptool is a helper utility to manage source dependencies using the online wrapdb service.

meson wrap < command > [ options ]

You should run this command in the top level source directory of your project.



list all available projects
search projects by name
install a project with the given name
update the specified project to latest available version
show available versions of the specified project
show installed and available versions of currently used subprojects





The setup command
The configure command
The introspect command
The test command
The wrap command

Please read "Why adblockers are bad".

Other free services
Shorten long
URLs to short
links like
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2017 Sascha Nitsch Unternehmensberatung UG(haftungsbeschränkt)
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 2.4 ms