1 .TH MESON "1" "November 2021" "meson 0.60.2" "User Commands"
3 meson - a high productivity build system
6 Meson is a build system designed to optimize programmer
7 productivity. It aims to do this by providing simple, out-of-the-box
8 support for modern software development tools and practices, such as
9 unit tests, coverage reports, Valgrind, Ccache and the like.
11 The main Meson executable provides many subcommands to access all
16 Using Meson is simple and follows the common two-phase
17 process of most build systems. First you run Meson to
28 Note that the build directory must be different from the source
29 directory. Meson does not support building inside the source directory
30 and attempting to do that leads to an error.
32 After a successful configuration step you can build the source by
33 running the actual build command in the build directory. The default
34 backend of Meson is Ninja, which can be invoked like this.
36 \fBninja [\fR \fItarget\fR \fB]\fR
38 You only need to run the Meson command once: when you first configure
39 your build dir. After that you just run the build command. Meson will
40 autodetect changes in your source tree and regenerate all files
41 needed to build the project.
43 The setup command is the default operation. If no actual command is
44 specified, Meson will assume you meant to do a setup. That means
45 that you can set up a build directory without the setup command
62 print command line help
64 .SH The configure command
67 provides a way to configure a Meson project from the command line.
76 If build directory is omitted, the current directory is used instead.
78 If no parameters are set,
80 will print the value of all build options to the console.
82 To set values, use the \-D command line argument like this.
84 .B meson configure \-Dopt1=value1 \-Dopt2=value2
86 .SH The introspect command
88 Meson introspect is a command designed to make it simple to integrate with
89 other tools, such as IDEs. The output of this command is in JSON.
97 If build directory is omitted, the current directory is used instead.
102 print all top level targets (executables, libraries, etc)
104 \fB\-\-target\-files\fR
105 print the source files of the given target
107 \fB\-\-buildsystem\-files\fR
108 print all files that make up the build system (meson.build, meson_options.txt etc)
114 print command line help
119 is a helper tool for running test suites of projects using Meson.
120 The default way of running tests is to invoke the default build command:
122 \fBninja [\fR \fItest\fR \fB]\fR
125 provides a richer set of tools for invoking tests.
128 automatically rebuilds the necessary targets to run tests when used with the Ninja backend.
131 will return an exit code of 125.
132 This return code tells
134 to skip the current commit.
135 Thus bisecting using git can be done conveniently like this.
137 .B git bisect run meson test -C build_dir
142 run tests as many times as specified
148 list all available tests
151 invoke all tests via the given wrapper (e.g. valgrind)
154 Change into the given directory before running tests (must be root of build directory).
157 run tests in this suite
160 do not run tests in this suite
162 \fB\-\-no\-stdsplit\fR
163 do not split stderr and stdout in test logs
166 run benchmarks instead of tests
169 base of file name to use for writing test logs
171 \fB\-\-num-processes\fR
172 how many parallel processes to use to run tests
175 do not redirect stdout and stderr
178 a multiplier to use for test timeout values (usually something like 100 for Valgrind)
181 use the specified test setup
185 Wraptool is a helper utility to manage source dependencies
186 using the online wrapdb service.
194 You should run this command in the top level source directory
200 list all available projects
203 search projects by name
206 install a project with the given name
209 update the specified project to latest available version
212 show available versions of the specified project
215 show installed and available versions of currently used subprojects
224 Usage error, or an error parsing or executing meson.build.
231 could not rebuild the required targets.
236 http://mesonbuild.com/
238 https://wrapdb.mesonbuild.com/