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/Commands.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/markdown/Commands.md') diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md index 75b22817d..efc316ce7 100644 --- a/docs/markdown/Commands.md +++ b/docs/markdown/Commands.md @@ -244,6 +244,17 @@ Configures a build directory for the Meson project. was no COMMAND supplied). However, supplying the command is necessary to avoid clashes with future added commands, so "setup" should be used explicitly. +*Since 1.1.0* `--reconfigure` is allowed even if the build directory does not +already exist, that argument is ignored in that case. + +*Since 1.3.0* 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`. + +*Since 1.3.0* It is possible to clear the cache and reconfigure in a single command +with `meson setup --clearcache --reconfigure `. + {{ setup_arguments.inc }} See [Meson introduction -- cgit v1.2.3