aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-05-13 10:36:58 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-06 20:02:37 +0000
commit00414a326a344410392235941202bb922d704fb2 (patch)
tree0d939f8eff0fb6c78c547d797cb6222cd30b5b28
parentd503b1423e14a9debd23691b9c89e8213c44ad65 (diff)
downloadmeson-00414a326a344410392235941202bb922d704fb2.zip
meson-00414a326a344410392235941202bb922d704fb2.tar.gz
meson-00414a326a344410392235941202bb922d704fb2.tar.bz2
dependencies: Take options from coredata instead of cmd line
These are the last remaining places where attributes set by argparse for "--builtin-option" are used.
-rw-r--r--mesonbuild/dependencies/boost.py3
-rw-r--r--mesonbuild/dependencies/ui.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index a17fb58..62274b5 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -97,8 +97,7 @@ class BoostDependency(ExternalDependency):
def __init__(self, environment, kwargs):
super().__init__('boost', environment, 'cpp', kwargs)
self.need_static_link = ['boost_exception', 'boost_test_exec_monitor']
- # FIXME: is this the right way to find the build type?
- self.is_debug = environment.cmd_line_options.buildtype.startswith('debug')
+ self.is_debug = environment.coredata.get_builtin_option('buildtype').startswith('debug')
threading = kwargs.get("threading", "multi")
self.is_multithreading = threading == "multi"
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index 898f4ed..1f8c3f5 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -347,7 +347,7 @@ class QtBaseDependency(ExternalDependency):
for dir in priv_inc:
self.compile_args.append('-I' + dir)
if for_windows(self.env.is_cross_build(), self.env):
- is_debug = self.env.cmd_line_options.buildtype.startswith('debug')
+ is_debug = self.env.coredata.get_builtin_option('buildtype').startswith('debug')
dbg = 'd' if is_debug else ''
if self.qtver == '4':
base_name = 'Qt' + module + dbg + '4'