diff options
author | gjaeger1 <jaegergeorg@web.de> | 2019-07-10 23:30:58 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-11 00:30:58 +0300 |
commit | 30e42009c03cbb53e3462e1c4ee29af666474742 (patch) | |
tree | aaae8ad451e31b7ff72a685bdbb3525616241005 /mesonbuild | |
parent | 748c9d817d8b6a0bb79eeba6256370db777754f4 (diff) | |
download | meson-30e42009c03cbb53e3462e1c4ee29af666474742.zip meson-30e42009c03cbb53e3462e1c4ee29af666474742.tar.gz meson-30e42009c03cbb53e3462e1c4ee29af666474742.tar.bz2 |
Adapting Boost Python library detection to Boost >= 1.67. Closes #4288.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/boost.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 5c9e0b5..340a5a9 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -134,22 +134,31 @@ class BoostDependency(ExternalDependency): else: self.incdir = self.detect_nix_incdir() - if self.check_invalid_modules(): - return - mlog.debug('Boost library root dir is', mlog.bold(self.boost_root)) mlog.debug('Boost include directory is', mlog.bold(self.incdir)) # 1. check if we can find BOOST headers. self.detect_headers_and_version() + if not self.is_found: + return # if we can not find 'boost/version.hpp' + # 2. check if we can find BOOST libraries. - if self.is_found: - self.detect_lib_modules() - mlog.debug('Boost library directory is', mlog.bold(self.libdir)) + self.detect_lib_modules() + mlog.debug('Boost library directory is', mlog.bold(self.libdir)) + + mlog.debug('Installed Boost libraries: ') + for key in sorted(self.lib_modules.keys()): + mlog.debug(key, self.lib_modules[key]) + + # 3. check if requested modules are valid, that is, either found or in the list of known boost libraries + self.check_invalid_modules() + + # 4. final check whether or not we find all requested and valid modules + self.check_find_requested_modules() def check_invalid_modules(self): - invalid_modules = [c for c in self.requested_modules if 'boost_' + c not in BOOST_LIBS] + invalid_modules = [c for c in self.requested_modules if 'boost_' + c not in self.lib_modules and 'boost_' + c not in BOOST_LIBS] # previous versions of meson allowed include dirs as modules remove = [] @@ -273,6 +282,7 @@ class BoostDependency(ExternalDependency): else: self.detect_lib_modules_nix() + def check_find_requested_modules(self): # 3. Check if we can find the modules for m in self.requested_modules: if 'boost_' + m not in self.lib_modules: @@ -491,7 +501,6 @@ class BoostDependency(ExternalDependency): def get_sources(self): return [] - # Generated with boost_names.py BOOST_LIBS = [ 'boost_atomic', @@ -547,10 +556,6 @@ BOOST_LIBS = [ 'boost_math_c99l', 'boost_mpi', 'boost_program_options', - 'boost_python', - 'boost_python3', - 'boost_numpy', - 'boost_numpy3', 'boost_random', 'boost_regex', 'boost_serialization', |