Meson linux что это

The Meson Build system

Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.

The main design point of Meson is that every moment a developer spends writing or debugging build definitions is a second wasted. So is every second spent waiting for the build system to actually start compiling code.

Features

  • multiplatform support for Linux, macOS, Windows, GCC, Clang, Visual Studio and others
  • supported languages include C, C++, D, Fortran, Java, Rust
  • build definitions in a very readable and user friendly non-Turing complete DSL
  • cross compilation for many operating systems as well as bare metal
  • optimized for extremely fast full and incremental builds without sacrificing correctness
  • built-in multiplatform dependency provider that works together with distro packages
  • fun!

Quickstart for beginners

Are you an absolute beginner when it comes to programming? No worries, read this beginner guide to get started.

Community

The easiest way for most people to connect to other Meson developers is a web chat. The channel to use is #mesonbuild either via Matrix (web interface) or OFTC IRC.

Other methods of communication include the mailing list (hosted by Google Groups) and the Discussions section of the Meson GitHub repository.

Projects using Meson

Many projects are using Meson and they’re a great resource for learning what to (and what not to!) do when converting existing projects to Meson.

A short list of Meson users can be found here but there are many more. We would love to hear about your success stories too and how things could be improved too!

Development

All development on Meson is done on the GitHub project. Instructions for contributing can be found on the contribution page.

You do not need to sign a CLA to contribute to Meson.

Quickstart Guide – Getting Started using Mesonbuild

Reference manual – The Meson reference manual

Style recommendations – Style recommendations for Meson files

Meson file rewriter – Automatic modification of the build system files

Читайте также:  Teamviewer для linux консоли

Источник

DESCRIPTION

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 ] [ build directory ] [ source 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 regenerate 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 ] [ build directory ] [ source directory ]

options:

The configure command

meson configure 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, meson configure 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.

options:

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

Читайте также:  Linux images iso files

The test command

meson test 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 ]

meson test provides a richer set of tools for invoking tests.

meson test automatically rebuilds the necessary targets to run tests when used with the Ninja backend. Upon build failure, meson test will return an exit code of 125. This return code tells git bisect run to skip the current commit. Thus bisecting using git can be done conveniently like this.

git bisect run meson test -C build_dir

options:

—repeat run tests as many times as specified —gdb run tests under gdb —list list all available tests —wrapper invoke all tests via the given wrapper (e.g. valgrind) -C Change into the given directory before running tests (must be root of build directory). —suite run tests in this suite —no-suite do not run tests in this suite —no-stdsplit do not split stderr and stdout in test logs —benchmark run benchmarks instead of tests —logbase base of file name to use for writing test logs —num-processes how many parallel processes to use to run tests —verbose do not redirect stdout and stderr -t a multiplier to use for test timeout values (usually something like 100 for Valgrind) —setup 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.

Commands:

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

EXIT STATUS

0 Successful. 1 Usage error, or an error parsing or executing meson.build. 2 Internal error. 125 meson test could not rebuild the required targets.

SEE ALSO

Package name: extra/meson Version: 1.1.1-1 Upstream: https://mesonbuild.com/ Licenses: Apache Manuals: /listing/extra/meson/ Table of contents

Читайте также:  Copy linux files to machines

Powered by archmanweb, using mandoc for the conversion of manual pages.

The website is available under the terms of the GPL-3.0 license, except for the contents of the manual pages, which have their own license specified in the corresponding Arch Linux package.

Источник

Manual

This is the user manual for Meson. It currently tracks the state of Git head. If you are using an older version, some of the information here might not work for you.

Overview – Overview of the Meson build system

Running Meson – Building a project with Meson

Built-in options – Built-in options to configure project properties

Using with Visual Studio – How to use Meson in Visual Studio

Meson sample – Simple project step by step explanation

Syntax – Syntax and structure of Meson files

Build targets – Definition of build targets

Include directories – Instructions on handling include directories

Adding arguments – Adding compiler arguments

Configuration – Build-time configuration options

Dependencies – Dependencies for external libraries and frameworks

External commands – Running external commands

Precompiled headers – Using precompiled headers to reduce compilation time

Unity builds – Unity builds are a technique for reducing build times

Feature autodetection – Auto-detection of features like ccache and code coverage

Generating sources – Generation of source files before compilation

Unit tests – Meson’s own unit-test system

Cross compilation – Setting up cross-compilation

Localisation – Localization with GNU Gettext

Build options – Build options to configure project properties

Subprojects – Using Meson projects as subprojects within other Meson projects

Modules – Meson modules for common build operations

Vala – Compiling Vala and Genie programs

Cython – Support for Cython in Meson

Rust – Working with Rust in Meson

IDE integration – Meson’s API to integrate Meson support into an IDE

Custom build targets – Build targets for custom languages or corner-cases

Build system converters – Converting other build systems to Meson

Configuring a build directory – Configuring a pre-generated build directory

Run targets – Targets to run external commands

Creating OSX packages – Tools to create OS X packages

Creating Linux binaries – Creating universal Linux binaries

The results of the search are

Источник

Оцените статью
Adblock
detector