Make libs a set from the begining

pull/9063/head
Kevin Meagher 3 years ago committed by Daniel Mensinger
parent 7ce29e1eda
commit f781c30700
  1. 6
      mesonbuild/dependencies/boost.py

@ -611,17 +611,17 @@ class BoostDependency(SystemDependency):
return libs
def detect_libraries(self, libdir: Path) -> T.List[BoostLibraryFile]:
libs = [] # type: T.List[Path]
libs = set() # type: T.Set[Path]
for i in libdir.iterdir():
if not i.is_file():
continue
if not any([i.name.startswith(x) for x in ['libboost_', 'boost_']]):
continue
libs += [i.resolve()]
libs.add(i.resolve())
# Remove duplicate libraries caused by resolving symlinks
blibs = [BoostLibraryFile(i) for i in set(libs)] # type: T.List[BoostLibraryFile]
blibs = [BoostLibraryFile(i) for i in libs] # type: T.List[BoostLibraryFile]
return [x for x in blibs if x.is_boost()] # Filter out no boost libraries

Loading…
Cancel
Save