mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
Merge topic 'FindBoost-vs-toolset-fallback'
862482df
FindBoost: Support prebuilt Windows binaries from SourceForge3ca6f70f
FindBoost: Allow testing for multiple compiler suffixes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !639
This commit is contained in:
commit
fb3f6fd3fe
@ -127,7 +127,10 @@
|
||||
# ('n' tag). Default is OFF.
|
||||
# Boost_COMPILER - Set to the compiler-specific library suffix
|
||||
# (e.g. "-gcc43"). Default is auto-computed
|
||||
# for the C++ compiler in use.
|
||||
# for the C++ compiler in use. A list may be
|
||||
# used if multiple compatible suffixes should
|
||||
# be tested for, in decreasing order of
|
||||
# preference.
|
||||
# Boost_THREADAPI - Suffix for "thread" component library name,
|
||||
# such as "pthread" or "win32". Names with
|
||||
# and without this suffix will both be tried.
|
||||
@ -428,7 +431,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
|
||||
set(_boost_COMPILER "-ghs")
|
||||
elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
|
||||
set(_boost_COMPILER "-vc141")
|
||||
set(_boost_COMPILER "-vc141;-vc140")
|
||||
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
|
||||
set(_boost_COMPILER "-vc140")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
|
||||
@ -901,7 +904,8 @@ macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlib
|
||||
set(_arch_suffix 32)
|
||||
endif()
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
|
||||
list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-15.0)
|
||||
list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1)
|
||||
list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
|
||||
list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
|
||||
@ -1119,6 +1123,12 @@ if(NOT Boost_INCLUDE_DIR)
|
||||
if( Boost_NO_SYSTEM_PATHS)
|
||||
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})
|
||||
string(REPLACE "." "_" ver "${ver}")
|
||||
list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS "C:/local/boost_${ver}")
|
||||
endforeach()
|
||||
endif()
|
||||
list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS
|
||||
C:/boost/include
|
||||
C:/boost
|
||||
@ -1392,12 +1402,16 @@ 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})
|
||||
string(REPLACE "." "_" ver "${ver}")
|
||||
_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/local/boost_${ver}")
|
||||
endforeach()
|
||||
_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost")
|
||||
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} PATHS
|
||||
C:/boost/lib
|
||||
C:/boost
|
||||
/sw/local/lib
|
||||
)
|
||||
_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@ -1524,17 +1538,24 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
#
|
||||
# Find RELEASE libraries
|
||||
#
|
||||
unset(_boost_RELEASE_NAMES)
|
||||
foreach(compiler IN LISTS _boost_COMPILER)
|
||||
list(APPEND _boost_RELEASE_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
|
||||
endforeach()
|
||||
set(_boost_RELEASE_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
|
||||
if(_boost_STATIC_RUNTIME_WORKAROUND)
|
||||
set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
|
||||
foreach(compiler IN LISTS _boost_COMPILER)
|
||||
list(APPEND _boost_RELEASE_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
|
||||
endforeach()
|
||||
list(APPEND _boost_RELEASE_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
|
||||
endif()
|
||||
@ -1565,18 +1586,25 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
|
||||
#
|
||||
# Find DEBUG libraries
|
||||
#
|
||||
set(_boost_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
|
||||
unset(_boost_DEBUG_NAMES)
|
||||
foreach(compiler IN LISTS _boost_COMPILER)
|
||||
list(APPEND _boost_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
|
||||
endforeach()
|
||||
list(APPEND _boost_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
|
||||
if(_boost_STATIC_RUNTIME_WORKAROUND)
|
||||
set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
|
||||
foreach(compiler IN LISTS _boost_COMPILER)
|
||||
list(APPEND _boost_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
|
||||
endforeach()
|
||||
list(APPEND _boost_DEBUG_NAMES
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
|
||||
${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user