aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-11-03 03:31:56 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-11-03 03:31:56 +0200
commit8495075ceeb7c2d12589a9226d74e19f5cfc7e9b (patch)
tree6f5ae49754981a388b0c1e9ff194e52fb3aba29a /meson.py
parente2313b85d7f0d10c0995ea9887bee00c2763290a (diff)
downloadmeson-8495075ceeb7c2d12589a9226d74e19f5cfc7e9b.zip
meson-8495075ceeb7c2d12589a9226d74e19f5cfc7e9b.tar.gz
meson-8495075ceeb7c2d12589a9226d74e19f5cfc7e9b.tar.bz2
Turned builtin options into proper objects.
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/meson.py b/meson.py
index 17c1e9e..a9e5c70 100755
--- a/meson.py
+++ b/meson.py
@@ -22,14 +22,11 @@ import build
import platform
import mlog, coredata
-from coredata import MesonException
-
-parser = argparse.ArgumentParser()
+from coredata import MesonException, build_types, layouts, warning_levels, libtypelist
backendlist = ['ninja', 'vs2010', 'xcode']
-build_types = ['plain', 'debug', 'debugoptimized', 'release']
-layouts = ['mirror', 'flat']
-warning_levels = ['1', '2', '3']
+
+parser = argparse.ArgumentParser()
default_warning = '2'
@@ -68,7 +65,7 @@ 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('--default-library', choices=['shared', 'static'], dest='default_library',
+parser.add_argument('--default-library', choices=libtypelist, dest='default_library',
default='static', help='Default library type.')
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)')