aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/meson_compile_command.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets/meson_compile_command.md')
-rw-r--r--docs/markdown/snippets/meson_compile_command.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/markdown/snippets/meson_compile_command.md b/docs/markdown/snippets/meson_compile_command.md
new file mode 100644
index 0000000..e029ff8
--- /dev/null
+++ b/docs/markdown/snippets/meson_compile_command.md
@@ -0,0 +1,21 @@
+## Backend agnostic compile command
+
+A new `meson compile` command has been added to support backend agnostic
+compilation. It accepts two arguments, `-j` and `-l`, which are used if
+possible (`-l` does nothing with msbuild). A `-j` or `-l` value < 1 lets the
+backend decide how many threads to use. For msbuild this means `-m`, for
+ninja it means passing no arguments.
+
+```console
+meson builddir --backend vs
+meson compile -C builddir -j0 # this is the same as `msbuild builddir/my.sln -m`
+```
+
+```console
+meson builddir
+meson compile -C builddir -j3 # this is the same as `ninja -C builddir -j3`
+```
+
+Additionally `meson compile` provides a `--clean` switch to clean the project.
+
+A complete list of arguments is always documented via `meson compile --help`