diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-08-10 10:32:28 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2018-09-04 09:01:39 -0400 |
commit | ef231d3edd01df4d3e0f55ccc6f1c683f1bb112f (patch) | |
tree | 4a9e4d341c7c67da4eafbb36c08cf84e50ce454c /mesonbuild/mesonmain.py | |
parent | b350c74386a3c0b7cd894ea589d3e399fd919515 (diff) | |
download | meson-ef231d3edd01df4d3e0f55ccc6f1c683f1bb112f.zip meson-ef231d3edd01df4d3e0f55ccc6f1c683f1bb112f.tar.gz meson-ef231d3edd01df4d3e0f55ccc6f1c683f1bb112f.tar.bz2 |
Add --fatal-meson-warnings command line option
This makes any warning message printed by meson raise an exception,
intended to be used by CI and developpers to easily catch deprecation
warnings and other potential issues.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 7dddb58..b150731 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -41,6 +41,8 @@ def create_parser(): help='Special wrap mode to use') p.add_argument('--profile-self', action='store_true', dest='profile', help=argparse.SUPPRESS) + p.add_argument('--fatal-meson-warnings', action='store_true', dest='fatal_warnings', + help='Make all Meson warnings fatal') p.add_argument('builddir', nargs='?', default=None) p.add_argument('sourcedir', nargs='?', default=None) return p @@ -110,7 +112,7 @@ class MesonApp: def generate(self): env = environment.Environment(self.source_dir, self.build_dir, self.options) - mlog.initialize(env.get_log_dir()) + mlog.initialize(env.get_log_dir(), self.options.fatal_warnings) if self.options.profile: mlog.set_timestamp_start(time.monotonic()) with mesonlib.BuildDirLock(self.build_dir): |