Skip to content

Commit 76dfc63

Browse files
committed
Dep/Boost: Search for all binary compatible boost installations, not only the one exactly matching MSVC toolset
(cherry picked from commit d808284cde9ec0079d16e6d02d58c3c100987341)
1 parent 0c4c280 commit 76dfc63

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

dep/boost/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ if(WIN32)
2121
string(SUBSTRING "${MSVC_TOOLSET_VERSION}" 0 ${_BOOST_MSVC_TOOLSET_VERSION_LENGTH} _BOOST_MSVC_TOOLSET_VERSION_MAJOR)
2222
string(SUBSTRING "${MSVC_TOOLSET_VERSION}" ${_BOOST_MSVC_TOOLSET_VERSION_LENGTH} -1 _BOOST_MSVC_TOOLSET_VERSION_MINOR)
2323

24-
set(BOOST_SEARCH_HINTS "${BOOST_ROOT}/lib${PLATFORM}-msvc-${_BOOST_MSVC_TOOLSET_VERSION_MAJOR}.${_BOOST_MSVC_TOOLSET_VERSION_MINOR}/cmake")
24+
while(_BOOST_MSVC_TOOLSET_VERSION_MINOR GREATER_EQUAL 0)
25+
list(APPEND BOOST_SEARCH_HINTS "${BOOST_ROOT}/lib${PLATFORM}-msvc-${_BOOST_MSVC_TOOLSET_VERSION_MAJOR}.${_BOOST_MSVC_TOOLSET_VERSION_MINOR}/cmake")
26+
math(EXPR _BOOST_MSVC_TOOLSET_VERSION_MINOR "${_BOOST_MSVC_TOOLSET_VERSION_MINOR} - 1" OUTPUT_FORMAT DECIMAL)
27+
endwhile()
2528

2629
unset(_BOOST_MSVC_TOOLSET_VERSION_LENGTH)
2730
unset(_BOOST_MSVC_TOOLSET_VERSION_MAJOR)

0 commit comments

Comments
 (0)