aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/msetup.md
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-03-30 09:29:27 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-08-25 09:43:24 -0400
commite3a71a7b58ac559f8669ca6fa95617a537b47f98 (patch)
treeb75a9a8c65ea3196bd743bb85b7d1a879c3d0c6a /docs/markdown/snippets/msetup.md
parent1bb29b1b329ec056c61a54070024b6b003cf5ca4 (diff)
downloadmeson-e3a71a7b58ac559f8669ca6fa95617a537b47f98.zip
meson-e3a71a7b58ac559f8669ca6fa95617a537b47f98.tar.gz
meson-e3a71a7b58ac559f8669ca6fa95617a537b47f98.tar.bz2
msetup: Update options when builddir is already configured
`meson setup -Dfoo=bar builddir` command was returning success ignoring new option values. This now also update options. It is useful because it means `meson setup -Dfoo=bar builddir && ninja -C builddir` works regardless whether builddir already exists or not, and when done in a script, changing options in the script will automatically trigger a reconfigure if needed. This was already possible by always passing --reconfigure argument, but that triggers a reconfigure even when options did not change.
Diffstat (limited to 'docs/markdown/snippets/msetup.md')
-rw-r--r--docs/markdown/snippets/msetup.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/msetup.md b/docs/markdown/snippets/msetup.md
new file mode 100644
index 0000000..f68313d
--- /dev/null
+++ b/docs/markdown/snippets/msetup.md
@@ -0,0 +1,13 @@
+## Update options with `meson setup <builddir> -Dopt=value`
+
+If the build directory already exists, options are updated with their new value
+given on the command line (`-Dopt=value`). Unless `--reconfigure` is also specified,
+this won't reconfigure immediately. This has the same behaviour as
+`meson configure <builddir> -Dopt=value`.
+
+Previous Meson versions were simply a no-op.
+
+## Clear persistent cache with `meson setup --clearcache`
+
+Just like `meson configure --clearcache`, it is now possible to clear the cache
+and reconfigure in a single command with `meson setup --clearcache --reconfigure <builddir>`.