diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-17 21:08:07 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-17 21:08:07 +0200 |
commit | de03ae5af0d8fd56e37d068e0bb405f74e62f30f (patch) | |
tree | eec446b30e28f8ba7b0e28dba7d5d5070c2feee6 /mesonbuild/mintro.py | |
parent | 19046fd8543c2c1c7b8cfc1aa6fef11741f3fc51 (diff) | |
download | meson-de03ae5af0d8fd56e37d068e0bb405f74e62f30f.zip meson-de03ae5af0d8fd56e37d068e0bb405f74e62f30f.tar.gz meson-de03ae5af0d8fd56e37d068e0bb405f74e62f30f.tar.bz2 |
Fix mesonintrospect.
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r-- | mesonbuild/mintro.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index b088117..021aed1 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -89,28 +89,29 @@ def list_target_files(target_name, coredata, builddata): def list_buildoptions(coredata, builddata): buildtype= {'choices': ['plain', 'debug', 'debugoptimized', 'release'], 'type' : 'combo', - 'value' : coredata.buildtype, + 'value' : coredata.builtin_options['buildtype'].value, 'description' : 'Build type', 'name' : 'type'} - strip = {'value' : coredata.strip, + strip = {'value' : coredata.builtin_options['strip'].value, 'type' : 'boolean', 'description' : 'Strip on install', 'name' : 'strip'} - coverage = {'value': coredata.coverage, + coverage = {'value': coredata.builtin_options['coverage'].value, 'type' : 'boolean', 'description' : 'Enable coverage', 'name' : 'coverage'} - pch = {'value' : coredata.use_pch, + pch = {'value' : coredata.builtin_options['use_pch'].value, 'type' : 'boolean', 'description' : 'Use precompiled headers', 'name' : 'pch'} - unity = {'value' : coredata.unity, + unity = {'value' : coredata.builtin_options['unity'].value, 'type' : 'boolean', 'description' : 'Unity build', 'name' : 'unity'} optlist = [buildtype, strip, coverage, pch, unity] add_keys(optlist, coredata.user_options) add_keys(optlist, coredata.compiler_options) + add_keys(optlist, coredata.base_options) print(json.dumps(optlist)) def add_keys(optlist, options): @@ -121,14 +122,14 @@ def add_keys(optlist, options): optdict = {} optdict['name'] = key optdict['value'] = opt.value - if isinstance(opt, mesonlib.UserStringOption): + if isinstance(opt, coredata.UserStringOption): typestr = 'string' - elif isinstance(opt, mesonlib.UserBooleanOption): + elif isinstance(opt, coredata.UserBooleanOption): typestr = 'boolean' - elif isinstance(opt, mesonlib.UserComboOption): + elif isinstance(opt, coredata.UserComboOption): optdict['choices'] = opt.choices typestr = 'combo' - elif isinstance(opt, mesonlib.UserStringArrayOption): + elif isinstance(opt, coredata.UserStringArrayOption): typestr = 'stringarray' else: raise RuntimeError("Unknown option type") |