1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-04 03:15:23 +02:00
tldr/pages/common/meson.md

29 lines
588 B
Markdown
Raw Normal View History

2020-09-05 07:05:18 +08:00
# meson
> SCons-like build system that uses Python as a front-end language and Ninja as a building backend.
2025-05-04 20:03:26 +03:00
> More information: <https://mesonbuild.com/Commands.html>.
2020-09-05 07:05:18 +08:00
- Generate a C project with a given name and version:
2020-09-05 07:05:18 +08:00
2025-05-04 20:03:26 +03:00
`meson init {{[-l|--language]}} c {{[-n|--name]}} {{myproject}} --version {{0.1}}`
2020-09-05 07:05:18 +08:00
- Configure the `builddir` with default values:
2020-09-05 07:05:18 +08:00
`meson setup {{build_dir}}`
- Build the project:
`meson compile -C {{path/to/build_dir}}`
- Run all tests in the project:
`meson test`
2020-09-05 07:05:18 +08:00
- Show the help:
2025-05-04 20:03:26 +03:00
`meson {{[-h|--help]}}`
2020-09-05 07:05:18 +08:00
- Display version:
2020-09-05 07:05:18 +08:00
2025-05-04 20:03:26 +03:00
`meson {{[-v|--version]}}`