Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions mesonbuild/dependencies/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -
mlog.debug(' - potential library dirs: {}'.format([x.as_posix() for x in lib_dirs]))
mlog.debug(' - potential include dirs: {}'.format([x.path.as_posix() for x in inc_dirs]))

must_have_library = ['boost_python']

# 2. Find all boost libraries
libs: T.List[BoostLibraryFile] = []
for i in lib_dirs:
Expand All @@ -453,10 +451,6 @@ def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -
break
libs = sorted(set(libs))

any_libs_found = len(libs) > 0
if not any_libs_found:
return False

modules = ['boost_' + x for x in self.modules]
for inc in inc_dirs:
mlog.debug(f' - found boost {inc.version} include dir: {inc.path}')
Expand All @@ -467,7 +461,7 @@ def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -
mlog.debug(f' - {j}')

# 3. Select the libraries matching the requested modules
not_found_as_libs: T.List[str] = []
not_found: T.List[str] = []
selected_modules: T.List[BoostLibraryFile] = []
for mod in modules:
found = False
Expand All @@ -477,24 +471,7 @@ def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -
found = True
break
if not found:
not_found_as_libs += [mod]

# If a lib is not found, but an include directory exists,
# assume it is a header only module.
not_found: T.List[str] = []
for boost_modulename in not_found_as_libs:
assert boost_modulename.startswith('boost_')
if boost_modulename in must_have_library:
not_found.append(boost_modulename)
continue
include_subdir = boost_modulename.replace('boost_', 'boost/', 1)
headerdir_found = False
for inc_dir in inc_dirs:
if (inc_dir.path / include_subdir).is_dir():
headerdir_found = True
break
if not headerdir_found:
not_found.append(boost_modulename)
not_found += [mod]

# log the result
mlog.debug(' - found:')
Expand Down
Loading