diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/FAQ.md | 37 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 6 | ||||
-rw-r--r-- | docs/markdown/Release-notes-for-0.45.0.md | 26 | ||||
-rw-r--r-- | docs/markdown/Unit-tests.md | 8 | ||||
-rw-r--r-- | docs/markdown/snippets/del-old-names.md | 2 |
5 files changed, 68 insertions, 11 deletions
diff --git a/docs/markdown/FAQ.md b/docs/markdown/FAQ.md index 398604a..ff93216 100644 --- a/docs/markdown/FAQ.md +++ b/docs/markdown/FAQ.md @@ -294,3 +294,40 @@ for dependencies, even when an external dependency exists and could satisfy the version requirements, for example in order to make sure your project builds when fallbacks are used, you can use `--wrap-mode=forcefallback` since 0.46.0. + +## Why is Meson implemented in Python rather than [programming language X]? + +Because build systems are special in ways normal applications aren't. + +Perhaps the biggest limitation is that because Meson is used to build +software at the very lowest levels of the OS, it is part of the core +bootstrap for new systems. Whenever support for a new CPU architecture +is added, Meson must run on the system before software using it can be +compiled natively. This requirement adds two hard limitations. + +The first one is that Meson must have the minimal amount of +dependencies, because they must all be built during the bootstrap to +get Meson to work. + +The second is that Meson must support all CPU architectures, both +existing and future ones. As an example many new programming languages +have only an LLVM based compiler available. LLVM has limited CPU +support compared to, say, GCC, and thus bootstrapping Meson on such +platforms would first require adding new processor support to +LLVM. This is in most cases unfeasible. + +A further limitation is that we want developers on as many platforms +as possible to submit to Meson development using the default tools +provided by their operating system. In practice what this means is +that Windows developers should be able to contribute using nothing but +Visual Studio. + +At the time of writing (April 2018) there are only three languages +that could fullfill these requirements: + + - C + - C++ + - Python + +Out of these we have chosen Python because it is the best fit for our +needs. diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 0d3d1aa..da4c92b 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1243,6 +1243,12 @@ Keyword arguments are the following: - `should_fail` when true the test is considered passed if the executable returns a non-zero return value (i.e. reports an error) +- `suite` `'label'` (or list of labels `['label1', 'label2']`) + attached to this test. The suite name is qualified by a (sub)project + name resulting in `(sub)project_name:label`. In the case of a list + of strings, the suite names will be `(sub)project_name:label1`, + `(sub)project_name:label2`, etc. + - `timeout` the amount of seconds the test is allowed to run, a test that exceeds its time limit is always considered failed, defaults to 30 seconds diff --git a/docs/markdown/Release-notes-for-0.45.0.md b/docs/markdown/Release-notes-for-0.45.0.md index 6b24183..19d65b8 100644 --- a/docs/markdown/Release-notes-for-0.45.0.md +++ b/docs/markdown/Release-notes-for-0.45.0.md @@ -18,7 +18,7 @@ ldflags, etc) from. These binaries may now be specified in the `binaries` section of a cross file. -```dosini +```ini [binaries] cc = ... llvm-config = '/usr/bin/llvm-config32' @@ -37,12 +37,16 @@ time. Starting with this version it becomes a hard error. There used to be a keywordless version of `run_target` which looked like this: - run_target('targetname', 'command', 'arg1', 'arg2') +```meson +run_target('targetname', 'command', 'arg1', 'arg2') +``` This is now an error. The correct format for this is now: - run_target('targetname', - command : ['command', 'arg1', 'arg2']) +```meson +run_target('targetname', + command : ['command', 'arg1', 'arg2']) +``` ## Experimental FPGA support @@ -84,7 +88,9 @@ private directory: Hexadecimal integer literals can now be used in build and option files. - int_255 = 0xFF +```meson +int_255 = 0xFF +``` ## b_ndebug : if-release @@ -110,7 +116,9 @@ instead of directory itself, stripping basename of the source directory. There is a new integer option type with optional minimum and maximum values. It can be specified like this in the `meson_options.txt` file: - option('integer_option', type : 'integer', min : 0, max : 5, value : 3) +```meson +option('integer_option', type : 'integer', min : 0, max : 5, value : 3) +``` ## New method meson.project_license() @@ -124,7 +132,7 @@ cross-compilers, the Rust binary must be specified in your cross file. It should specify a `--target` (as installed by `rustup target`) and a custom linker pointing to your C cross-compiler. For example: -``` +```ini [binaries] c = '/usr/bin/arm-linux-gnueabihf-gcc-7' rust = [ @@ -146,9 +154,7 @@ private sysroot. Meson ships with predefined project templates. To start a new project from scratch, simply go to an empty directory and type: -```meson -meson init --name=myproject --type=executable --language=c -``` + meson init --name=myproject --type=executable --language=c ## Improve test setup selection diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index 53ce9ec..e5e4107 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -71,6 +71,14 @@ You can also run only a single test by giving its name: $ meson test testname ``` +Tests belonging to a suite `suite` can be run as follows + +```console +$ meson test --suite (sub)project_name:suite +``` + +Since version *0.46*, `(sub)project_name` can be omitted if it is the top-level project. + Sometimes you need to run the tests multiple times, which is done like this: ```console diff --git a/docs/markdown/snippets/del-old-names.md b/docs/markdown/snippets/del-old-names.md index c4abc9a..5ac5873 100644 --- a/docs/markdown/snippets/del-old-names.md +++ b/docs/markdown/snippets/del-old-names.md @@ -2,6 +2,6 @@ Old executable names `mesonintrospect`, `mesonconf`, `mesonrewriter` and `mesontest` have been deprecated for a long time. Starting from -this versino they no longer do anything but instead always error +this version they no longer do anything but instead always error out. All functionality is available as subcommands in the main `meson` binary. |