aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-09-17 20:07:40 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-09-17 20:07:40 +0300
commit5c5f8c781385d416748000dbdb6f74fa59382340 (patch)
tree7e2840d1befa52d6e5e95add4e68013ba7b12f46 /meson.py
parent067935ce76c03099abe83998c7c0cb80f64b92f1 (diff)
parent77d53c2266ec0d8cb4d2a0da9fae93f0eafb30c7 (diff)
downloadmeson-5c5f8c781385d416748000dbdb6f74fa59382340.zip
meson-5c5f8c781385d416748000dbdb6f74fa59382340.tar.gz
meson-5c5f8c781385d416748000dbdb6f74fa59382340.tar.bz2
Merged trunk changes.
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.py b/meson.py
index 6ca59de..da7b12f 100755
--- a/meson.py
+++ b/meson.py
@@ -29,6 +29,15 @@ parser = argparse.ArgumentParser()
backendlist = ['ninja', 'vs2010', 'xcode']
build_types = ['plain', 'debug', 'debugoptimized', 'release']
layouts = ['mirror', 'flat']
+warning_levels = ['1', '2', '3']
+
+default_warning = '1'
+try:
+ warn_candidate = os.environ['MESON_WARN_LEVEL']
+ if warn_candidate in warning_levels:
+ default_warning = warn_candidate
+except KeyError:
+ pass
if mesonlib.is_windows():
def_prefix = 'c:/'
@@ -65,6 +74,8 @@ parser.add_argument('--werror', action='store_true', dest='werror', default=Fals
help='Treat warnings as errors')
parser.add_argument('--layout', choices=layouts, dest='layout', default='mirror',\
help='Build directory layout.')
+parser.add_argument('--warnlevel', default=default_warning, dest='warning_level', choices=warning_levels,\
+ help='Level of compiler warnings to use (larger is more, default is %(default)s)')
parser.add_argument('--cross-file', default=None, dest='cross_file',
help='file describing cross compilation environment')
parser.add_argument('-D', action='append', dest='projectoptions', default=[],