From e3a71a7b58ac559f8669ca6fa95617a537b47f98 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 30 Mar 2023 09:29:27 -0400 Subject: 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. --- docs/markdown/snippets/msetup.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/markdown/snippets/msetup.md (limited to 'docs/markdown/snippets') 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 -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 -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 `. -- cgit v1.1