summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-05 18:03:39 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-05 18:04:51 (GMT)
commitade45fa3426745a63f6c0e5485561ca9e8b9e894 (patch)
tree700c95bc6b8ab13420b1bcaccaa1803420554a79 /Modules/FindBoost.cmake
parentfca4423786ba2c4a5ab0ec6c1a1cbac8cd8600b4 (diff)
downloadCMake-ade45fa3426745a63f6c0e5485561ca9e8b9e894.zip
CMake-ade45fa3426745a63f6c0e5485561ca9e8b9e894.tar.gz
CMake-ade45fa3426745a63f6c0e5485561ca9e8b9e894.tar.bz2
FindBoost: Revert "Simplify search in lists."
Revert commit v3.9.0-rc1~41^2 (FindBoost: Simplify search in lists, 2017-04-23). It regressed the module by exposing issue #17257, but the fix for that issue is not suitable for inclusion in a patch release. It is simplest to revert the commit until the larger problem can be addressed. Fixes: #17252
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake14
1 files changed, 5 insertions, 9 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index b4abf75..b970e2b 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -208,10 +208,6 @@
#
# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
-# Save project's policies
-cmake_policy(PUSH)
-cmake_policy(SET CMP0057 NEW) # if IN_LIST
-
#-------------------------------------------------------------------------------
# Before we go searching, check whether boost-cmake is available, unless the
# user specifically asked NOT to search for boost-cmake.
@@ -876,7 +872,9 @@ function(_Boost_MISSING_DEPENDENCIES componentvar extravar)
set(_Boost_${uppercomponent}_DEPENDENCIES ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE)
set(_Boost_IMPORTED_TARGETS ${_Boost_IMPORTED_TARGETS} PARENT_SCOPE)
foreach(componentdep ${_Boost_${uppercomponent}_DEPENDENCIES})
- if (NOT ("${componentdep}" IN_LIST _boost_processed_components OR "${componentdep}" IN_LIST _boost_new_components))
+ list(FIND _boost_processed_components "${componentdep}" _boost_component_found)
+ list(FIND _boost_new_components "${componentdep}" _boost_component_new)
+ if (_boost_component_found EQUAL -1 AND _boost_component_new EQUAL -1)
list(APPEND _boost_new_components ${componentdep})
endif()
endforeach()
@@ -1503,7 +1501,8 @@ endif()
_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS _Boost_EXTRA_FIND_COMPONENTS)
# If thread is required, get the thread libs as a dependency
-if("thread" IN_LIST Boost_FIND_COMPONENTS)
+list(FIND Boost_FIND_COMPONENTS thread _Boost_THREAD_DEPENDENCY_LIBS)
+if(NOT _Boost_THREAD_DEPENDENCY_LIBS EQUAL -1)
include(CMakeFindDependencyMacro)
find_dependency(Threads)
endif()
@@ -1928,6 +1927,3 @@ list(REMOVE_DUPLICATES _Boost_COMPONENTS_SEARCHED)
list(SORT _Boost_COMPONENTS_SEARCHED)
set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}"
CACHE INTERNAL "Components requested for this build tree.")
-
-# Restore project's policies
-cmake_policy(POP)