From 25c1a78616ae93af61e61f7aab7cb8ca5e4fd1b1 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Thu, 18 Jun 2020 16:45:27 +0200 Subject: [PATCH 3/3] mcompile: Add --verbose mode Closes: https://github.com/mesonbuild/meson/issues/7352 Signed-off-by: Igor Raits --- data/macros.meson | 1 + mesonbuild/mcompile.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/macros.meson b/data/macros.meson index 8a66c9657..cc4953c5f 100644 --- a/data/macros.meson +++ b/data/macros.meson @@ -28,6 +28,7 @@ %{shrink:%{__meson} compile \ -C %{_vpath_builddir} \ -j %{_smp_build_ncpus} \ + --verbose \ %{nil}} %meson_install \ diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index 7829ffc19..12048d09d 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -57,6 +57,11 @@ def add_arguments(parser: 'argparse.ArgumentParser') -> None: default='.', help='The directory containing build files to be built.' ) + parser.add_argument( + '--verbose', + action='store_true', + help='Show more verbose output.' + ) def run(options: 'argparse.Namespace') -> int: @@ -89,6 +94,8 @@ def run(options: 'argparse.Namespace') -> int: cmd.extend(['-j', str(options.jobs)]) if options.load_average > 0: cmd.extend(['-l', str(options.load_average)]) + if options.verbose: + cmd.append('-v') if options.clean: cmd.append('clean') @@ -107,8 +114,10 @@ def run(options: 'argparse.Namespace') -> int: if options.load_average: mlog.warning('Msbuild does not have a load-average switch, ignoring.') + if not options.verbose: + cmd.append('/v:minimal') if options.clean: - cmd.extend(['/t:Clean']) + cmd.append('/t:Clean') # TODO: xcode? else: -- 2.27.0