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