From 2516bccdf69b49ee55ef4b6bfa329d97ec5f3799 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Wed, 19 Apr 2017 16:22:32 +0700 Subject: FindBoost: Restore tolerance of backslashes in paths Since commit v3.8.0-rc1~136^2 (FindBoost: Search official location of prebuilt binaries on Windows, 2016-12-21) we pass input paths through `_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS` in more places than before. This broke tolerance of backslashes in paths provided by the user due to the macro argument re-parsing. Turn `_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS` into a function instead of macro to avoid re-parsing of macro arguments. Fixes: #16816 --- Modules/FindBoost.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 2dd08e1..52de6fc 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -893,7 +893,7 @@ endfunction() # This function would append corresponding directories if MSVC is a current compiler, # so having `BOOST_ROOT` would be enough to specify to find everything. # -macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) +function(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_arch_suffix 64) @@ -915,8 +915,9 @@ macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlib elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0) endif() + set(${componentlibvar} ${${componentlibvar}} PARENT_SCOPE) endif() -endmacro() +endfunction() # # End functions/macros -- cgit v0.12