boost: Better log found and missing modules

pull/6858/head
Daniel Mensinger 5 years ago committed by Jussi Pakkanen
parent 4d7ccd1399
commit 1bfd5e9dd2
  1. 22
      mesonbuild/dependencies/boost.py

@ -279,6 +279,9 @@ class BoostDependency(ExternalDependency):
if i.startswith('boost_'): if i.startswith('boost_'):
raise DependencyException('Boost modules must be passed without the boost_ prefix') raise DependencyException('Boost modules must be passed without the boost_ prefix')
self.modules_found = [] # type: T.List[str]
self.modules_missing = [] # type: T.List[str]
# Do we need threads? # Do we need threads?
if 'thread' in self.modules: if 'thread' in self.modules:
if not self._add_sub_dependency(threads_factory(environment, self.for_machine, {})): if not self._add_sub_dependency(threads_factory(environment, self.for_machine, {})):
@ -379,6 +382,13 @@ class BoostDependency(ExternalDependency):
comp_args = list(set(comp_args)) comp_args = list(set(comp_args))
link_args = list(set(link_args)) link_args = list(set(link_args))
self.modules_found = [x.mod_name for x in selected_modules]
self.modules_found = [x[6:] for x in self.modules_found]
self.modules_found = sorted(set(self.modules_found))
self.modules_missing = not_found
self.modules_missing = [x[6:] for x in self.modules_missing]
self.modules_missing = sorted(set(self.modules_missing))
# if we found all modules we are done # if we found all modules we are done
if not not_found: if not not_found:
self.version = inc.version self.version = inc.version
@ -526,10 +536,14 @@ class BoostDependency(ExternalDependency):
return roots return roots
def log_details(self) -> str: def log_details(self) -> str:
modules = sorted(set(self.modules)) res = ''
if modules: if self.modules_found:
return 'modules: ' + ', '.join(modules) res += 'found: ' + ', '.join(self.modules_found)
return '' if self.modules_missing:
if res:
res += ' | '
res += 'missing: ' + ', '.join(self.modules_missing)
return res
def log_info(self) -> str: def log_info(self) -> str:
if self.boost_root: if self.boost_root:

Loading…
Cancel
Save