From b37706737ce82a7b35810ae9843b6d654d6a7d14 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Wed, 17 Jan 2018 19:57:05 +0100 Subject: [PATCH] Log instead of raise if Boost library not found (#2924) --- mesonbuild/dependencies/misc.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 9614f1f0d..2ea8ed1eb 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -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 ', self.env, self.get_compile_args(), [])