Log instead of raise if Boost library not found
@@ -173,7 +173,12 @@ class BoostDependency(ExternalDependency):
if self.is_found:
self.detect_lib_modules()
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()
else:
self.log_fail()
@@ -262,12 +267,6 @@ class BoostDependency(ExternalDependency):
raise DependencyException('Boost module argument is not a string.')
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):
try:
version = self.compiler.get_define('BOOST_LIB_VERSION', '#include <boost/version.hpp>', self.env, self.get_compile_args(), [])
