From 7882f1f272541941a98097f9ddb4ab4ca74080b0 Mon Sep 17 00:00:00 2001 From: Alexey Klimkin Date: Thu, 1 Apr 2021 07:41:16 -0700 Subject: [PATCH] Adjust boost_system removal for VS builds --- recipes/boost/all/conanfile.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index df685ed9f4ea13..ced3cb05e33268 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1314,12 +1314,10 @@ def filter_transform_module_libraries(names): # still built for compatibility, but linking to it is no longer # necessary. # https://www.boost.org/doc/libs/1_75_0/libs/system/doc/html/system.html#changes_in_boost_1_69 - boost_system = "libboost_system" if self._is_msvc else "boost_system" - try: - all_detected_libraries.remove(boost_system) - except KeyError: - pass - continue + if "libboost_system" in all_detected_libraries: + all_detected_libraries.remove("libboost_system") + if "boost_system" in all_detected_libraries: + all_detected_libraries.remove("boost_system") libs.append(add_libprefix(name.format(**libformatdata)) + libsuffix) return libs