meson.1 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .TH MESON "1" "December 2017" "meson 0.44.0" "User Commands"
  2. .SH NAME
  3. meson - a high productivity build system
  4. .SH DESCRIPTION
  5. Meson is a build system designed to optimize programmer
  6. productivity. It aims to do this by providing simple, out-of-the-box
  7. support for modern software development tools and practices, such as
  8. unit tests, coverage reports, Valgrind, CCache and the like.
  9. The main Meson executable provides many subcommands to access all
  10. the functionality.
  11. .SH The setup command
  12. Using Meson is simple and follows the common two-phase
  13. process of most build systems. First you run Meson to
  14. configure your build:
  15. .B meson setup [
  16. .I options
  17. .B ] [
  18. .I source directory
  19. .B ] [
  20. .I build directory
  21. .B ]
  22. Note that the build directory must be different from the source
  23. directory. Meson does not support building inside the source directory
  24. and attempting to do that leads to an error.
  25. After a successful configuration step you can build the source by
  26. running the actual build command in the build directory. The default
  27. backend of Meson is Ninja, which can be invoked like this.
  28. \fBninja [\fR \fItarget\fR \fB]\fR
  29. You only need to run the Meson command once: when you first configure
  30. your build dir. After that you just run the build command. Meson will
  31. autodetect changes in your source tree and regenerates all files
  32. needed to build the project.
  33. The setup command is the default operation. If no actual command is
  34. specified, Meson will assume you meant to do a setup. That means
  35. that you can set up a build directory without the setup command
  36. like this:
  37. .B meson [
  38. .I options
  39. .B ] [
  40. .I source directory
  41. .B ] [
  42. .I build directory
  43. .B ]
  44. .SS "options:"
  45. .TP
  46. \fB\-\-version\fR
  47. print version number
  48. .TP
  49. \fB\-\-help\fR
  50. print command line help
  51. .SH The configure command
  52. .B meson configure
  53. provides a way to configure a Meson project from the command line.
  54. Its usage is simple:
  55. .B meson configure [
  56. .I build directory
  57. .B ] [
  58. .I options to set
  59. .B ]
  60. If build directory is omitted, the current directory is used instead.
  61. If no parameters are set,
  62. .B meson configure
  63. will print the value of all build options to the console.
  64. To set values, use the \-D command line argument like this.
  65. .B meson configure \-Dopt1=value1 \-Dopt2=value2
  66. .SH The introspect command
  67. Meson introspect is a command designed to make it simple to integrate with
  68. other tools, such as IDEs. The output of this command is in JSON.
  69. .B meson introspect [
  70. .I build directory
  71. .B ] [
  72. .I option
  73. .B ]
  74. If build directory is omitted, the current directory is used instead.
  75. .SS "options:"
  76. .TP
  77. \fB\-\-targets\fR
  78. print all top level targets (executables, libraries, etc)
  79. .TP
  80. \fB\-\-target\-files\fR
  81. print the source files of the given target
  82. .TP
  83. \fB\-\-buildsystem\-files\fR
  84. print all files that make up the build system (meson.build, meson_options.txt etc)
  85. .TP
  86. \fB\-\-tests\fR
  87. print all unit tests
  88. .TP
  89. \fB\-\-help\fR
  90. print command line help
  91. .SH The test command
  92. .B meson test
  93. is a helper tool for running test suites of projects using Meson.
  94. The default way of running tests is to invoke the default build command:
  95. \fBninja [\fR \fItest\fR \fB]\fR
  96. .B meson test
  97. provides a richer set of tools for invoking tests.
  98. .SS "options:"
  99. .TP
  100. \fB\-\-repeat\fR
  101. run tests as many times as specified
  102. .TP
  103. \fB\-\-gdb\fR
  104. run tests under gdb
  105. .TP
  106. \fB\-\-list\fR
  107. list all available tests
  108. .TP
  109. \fB\-\-wrapper\fR
  110. invoke all tests via the given wrapper (e.g. valgrind)
  111. .TP
  112. \fB\-C\fR
  113. Change into the given directory before running tests (must be root of build directory).
  114. .TP
  115. \fB\-\-suite\fR
  116. run tests in this suite
  117. .TP
  118. \fB\-\-no\-suite\fR
  119. do not run tests in this suite
  120. .TP
  121. \fB\-\-no\-stdsplit\fR
  122. do not split stderr and stdout in test logs
  123. .TP
  124. \fB\-\-benchmark\fR
  125. run benchmarks instead of tests
  126. .TP
  127. \fB\-\-logbase\fR
  128. base of file name to use for writing test logs
  129. .TP
  130. \fB\-\-num-processes\fR
  131. how many parallel processes to use to run tests
  132. .TP
  133. \fB\-\-verbose\fR
  134. do not redirect stdout and stderr
  135. .TP
  136. \fB\-t\fR
  137. a multiplier to use for test timeout values (usually something like 100 for Valgrind)
  138. .TP
  139. \fB\-\-setup\fR
  140. use the specified test setup
  141. .SH The wrap command
  142. Wraptool is a helper utility to manage source dependencies
  143. using the online wrapdb service.
  144. .B meson wrap <
  145. .I command
  146. .B > [
  147. .I options
  148. .B ]
  149. You should run this command in the top level source directory
  150. of your project.
  151. .SS "Commands:"
  152. .TP
  153. \fBlist\fR
  154. list all available projects
  155. .TP
  156. \fBsearch\fR
  157. search projects by name
  158. .TP
  159. \fBinstall\fR
  160. install a project with the given name
  161. .TP
  162. \fBupdate\fR
  163. update the specified project to latest available version
  164. .TP
  165. \fBinfo\fR
  166. show available versions of the specified project
  167. .TP
  168. \fBstatus\fR
  169. show installed and available versions of currently used subprojects
  170. .SH SEE ALSO
  171. http://mesonbuild.com/
  172. https://wrapdb.mesonbuild.com/