Log instead of raise if Boost library not found (#2924)

pull/2947/head
Jan Niklas Hasse 7 years ago committed by Jussi Pakkanen
parent 7eb6a29180
commit b37706737c
  1. 13
      mesonbuild/dependencies/misc.py

@ -173,7 +173,12 @@ class BoostDependency(ExternalDependency):
if self.is_found: if self.is_found:
self.detect_lib_modules() self.detect_lib_modules()
mlog.debug('Boost library directory is', mlog.bold(self.libdir)) mlog.debug('Boost library directory is', mlog.bold(self.libdir))
self.validate_requested() for m in self.requested_modules:
if 'boost_' + m not in self.lib_modules:
mlog.debug('Requested Boost library {!r} not found'.format(m))
self.log_fail()
self.is_found = False
return
self.log_success() self.log_success()
else: else:
self.log_fail() self.log_fail()
@ -262,12 +267,6 @@ class BoostDependency(ExternalDependency):
raise DependencyException('Boost module argument is not a string.') raise DependencyException('Boost module argument is not a string.')
return candidates return candidates
def validate_requested(self):
for m in self.requested_modules:
if 'boost_' + m not in self.lib_modules:
msg = 'Requested Boost library {!r} not found'
raise DependencyException(msg.format(m))
def detect_version(self): def detect_version(self):
try: try:
version = self.compiler.get_define('BOOST_LIB_VERSION', '#include <boost/version.hpp>', self.env, self.get_compile_args(), []) version = self.compiler.get_define('BOOST_LIB_VERSION', '#include <boost/version.hpp>', self.env, self.get_compile_args(), [])

Loading…
Cancel
Save