mcompile: Add --verbose mode

Closes: https://github.com/mesonbuild/meson/issues/7352
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
pull/7183/head
Igor Raits 5 years ago committed by Jussi Pakkanen
parent e353b2e8d4
commit d6c6b933c4
  1. 1
      data/macros.meson
  2. 2
      docs/markdown/Commands.md
  3. 5
      docs/markdown/Release-notes-for-0.54.0.md
  4. 11
      mesonbuild/mcompile.py

@ -28,6 +28,7 @@
%{shrink:%{__meson} compile \
-C %{_vpath_builddir} \
-j %{_smp_build_ncpus} \
--verbose \
%{nil}}
%meson_install \

@ -137,6 +137,7 @@ meson configure builddir -Doption=new_value
```
$ meson compile [-h] [-j JOBS] [-l LOAD_AVERAGE] [--clean] [-C BUILDDIR]
[--verbose]
```
Builds a default or a specified target of a configured meson project.
@ -153,6 +154,7 @@ optional arguments:
--clean Clean the build directory.
-C BUILDDIR The directory containing build files to
be built.
--verbose Show more verbose output.
```
#### Examples:

@ -359,3 +359,8 @@ target that has eight source files, Meson will generate two unity
files each of which includes four source files. The old behaviour can
be replicated by setting `unity_size` to a large value, such as 10000.
## Verbose mode for `meson compile`
The new option `--verbose` has been added to `meson compile` that will enable
more verbose compilation logs. Note that for VS backend it means that logs will
be less verbose by default (without `--verbose` option).

@ -54,6 +54,8 @@ def get_parsed_args_ninja(options: 'argparse.Namespace', builddir: Path):
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')
@ -74,8 +76,10 @@ def get_parsed_args_vs(options: 'argparse.Namespace', builddir: Path):
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')
return cmd
@ -108,6 +112,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:

Loading…
Cancel
Save