From 9855a80fd41e384bc3accd07fa8b98f7da7d916d Mon Sep 17 00:00:00 2001 From: Hannes Franke Date: Mon, 29 Oct 2018 16:20:40 +0100 Subject: FindBoost: search default path if Boost_FIND_VERSION_EXACT Search paths for boost versions should be build using _boost_TEST_VERSIONS instead of _Boost_KNOWN_VERSIONS because if Boost_FIND_VERSION_EXACT is used _Boost_KNOWN_VERSIONS is empty and boost isn't found even in its default installation path. Fixes: #17986 --- Modules/FindBoost.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 501929a..cde3738 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1258,7 +1258,7 @@ if(NOT Boost_INCLUDE_DIR) list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") - foreach(ver ${_Boost_KNOWN_VERSIONS}) + foreach(ver ${_boost_TEST_VERSIONS}) string(REPLACE "." "_" ver "${ver}") list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS "C:/local/boost_${ver}") endforeach() @@ -1569,7 +1569,7 @@ foreach(c DEBUG RELEASE) if( Boost_NO_SYSTEM_PATHS ) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() - foreach(ver ${_Boost_KNOWN_VERSIONS}) + foreach(ver ${_boost_TEST_VERSIONS}) string(REPLACE "." "_" ver "${ver}") _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/local/boost_${ver}") endforeach() -- cgit v0.12