From f781c30700923359a8dd17849bd00faaf9360719 Mon Sep 17 00:00:00 2001 From: Kevin Meagher <11620178+kjmeagher@users.noreply.github.com> Date: Thu, 15 Jul 2021 10:56:07 -0500 Subject: [PATCH] Make libs a set from the begining --- mesonbuild/dependencies/boost.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 6b594f892..26ec6fda2 100644 --- a/mesonbuild/dependencies/boost.py +++ b/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