From 43fe0061902f9d204eeeb8d4fef779480ec5487c Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Fri, 16 Feb 2024 13:40:25 +0100 Subject: [PATCH] Fix warning when using scan-build Using scan-build gives the following warning: "Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated." This commit fixes this issue by adding the setup keyword to the meson command. --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 782b264ac..2606ac43a 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -3574,7 +3574,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) return cmd = self.environment.get_build_command() + \ ['--internal', 'scanbuild', self.environment.source_dir, self.environment.build_dir, self.build.get_subproject_dir()] + \ - self.environment.get_build_command() + self.get_user_option_args() + self.environment.get_build_command() + ['setup'] + self.get_user_option_args() elem = self.create_phony_target('scan-build', 'CUSTOM_COMMAND', 'PHONY') elem.add_item('COMMAND', cmd) elem.add_item('pool', 'console')