mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user