Skip to content

Commit

Permalink
boost: Better log found and missing modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mensinda authored and jpakkane committed Mar 27, 2020
1 parent 4d7ccd1 commit 1bfd5e9
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions mesonbuild/dependencies/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def __init__(self, environment: Environment, kwargs):
if i.startswith('boost_'):
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?
if 'thread' in self.modules:
if not self._add_sub_dependency(threads_factory(environment, self.for_machine, {})):
Expand Down Expand Up @@ -379,6 +382,13 @@ def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -
comp_args = list(set(comp_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 not not_found:
self.version = inc.version
Expand Down Expand Up @@ -526,10 +536,14 @@ def detect_roots(self) -> T.List[Path]:
return roots

def log_details(self) -> str:
modules = sorted(set(self.modules))
if modules:
return 'modules: ' + ', '.join(modules)
return ''
res = ''
if self.modules_found:
res += 'found: ' + ', '.join(self.modules_found)
if self.modules_missing:
if res:
res += ' | '
res += 'missing: ' + ', '.join(self.modules_missing)
return res

def log_info(self) -> str:
if self.boost_root:
Expand Down

0 comments on commit 1bfd5e9

Please sign in to comment.