diff options
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 6ffa42a..7ceda3e 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -71,11 +71,6 @@ class BoostDependency(ExternalDependency): self.is_multithreading = threading == "multi" self.requested_modules = self.get_requested(kwargs) - invalid_modules = [c for c in self.requested_modules if 'boost_' + c not in BOOST_LIBS] - if invalid_modules: - mlog.warning('Invalid Boost modules: ' + ', '.join(invalid_modules)) - self.log_fail() - return self.boost_root = None self.boost_roots = [] @@ -112,6 +107,24 @@ class BoostDependency(ExternalDependency): self.log_fail() return + invalid_modules = [c for c in self.requested_modules if 'boost_' + c not in BOOST_LIBS] + + # previous versions of meson allowed include dirs as modules + remove = [] + for m in invalid_modules: + if m in os.listdir(os.path.join(self.incdir, 'boost')): + mlog.warning('Requested boost library', mlog.bold(m), 'that doesn\'t exist. ' + 'This will be an error in the future') + remove.append(m) + + self.requested_modules = [x for x in self.requested_modules if x not in remove] + invalid_modules = [x for x in invalid_modules if x not in remove] + + if invalid_modules: + mlog.warning('Invalid Boost modules: ' + ', '.join(invalid_modules)) + self.log_fail() + return + mlog.debug('Boost library root dir is', mlog.bold(self.boost_root)) mlog.debug('Boost include directory is', mlog.bold(self.incdir)) |