| From b044f69a413123f15a05034c00a8e3763764a1e5 Mon Sep 17 00:00:00 2001 |
| From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com> |
| Date: Fri, 29 Dec 2017 21:50:54 +1100 |
| Subject: [PATCH 2/6] FindBoost: Implement "Architecture and Address Model" tag |
| |
| This tag is new in Boost 1.66.0, and is present in the 'versioned' |
| library file name layout. |
| |
| Affects cmake < 3.11.0 |
| |
| Upsteam-Status: Backport |
| [Yocto 12762] |
| Signed-off-by: Armin Kuster <akuster808@gmail.com> |
| |
| --- |
| Modules/FindBoost.cmake | 52 +++++++++++++++++++++++++++++++++++++++---------- |
| 1 file changed, 42 insertions(+), 10 deletions(-) |
| |
| Index: cmake-3.10.3/Modules/FindBoost.cmake |
| =================================================================== |
| --- cmake-3.10.3.orig/Modules/FindBoost.cmake |
| +++ cmake-3.10.3/Modules/FindBoost.cmake |
| @@ -1385,8 +1385,11 @@ if(Boost_DEBUG) |
| endif() |
| |
| #====================== |
| -# Systematically build up the Boost ABI tag |
| -# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming |
| +# Systematically build up the Boost ABI tag for the 'tagged' and 'versioned' layouts |
| +# http://boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming |
| +# http://boost.org/doc/libs/1_66_0/boost/config/auto_link.hpp |
| +# http://boost.org/doc/libs/1_66_0/tools/build/src/tools/common.jam |
| +# http://boost.org/doc/libs/1_66_0/boostcpp.jam |
| set( _boost_RELEASE_ABI_TAG "-") |
| set( _boost_DEBUG_ABI_TAG "-") |
| # Key Use this library when: |
| @@ -1418,11 +1421,40 @@ if(Boost_USE_STLPORT) |
| string(APPEND _boost_DEBUG_ABI_TAG "p") |
| endif() |
| # n using the STLport deprecated "native iostreams" feature |
| +# removed from the documentation in 1.43.0 but still present in |
| +# boost/config/auto_link.hpp |
| if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS) |
| string(APPEND _boost_RELEASE_ABI_TAG "n") |
| string(APPEND _boost_DEBUG_ABI_TAG "n") |
| endif() |
| |
| +# -x86 Architecture and address model tag |
| +# First character is the architecture, then word-size, either 32 or 64 |
| +# Only used in 'versioned' layout, added in Boost 1.66.0 |
| +set(_boost_ARCHITECTURE_TAG "") |
| +# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers |
| +if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600) |
| + string(APPEND _boost_ARCHITECTURE_TAG "-") |
| + # This needs to be kept in-sync with the section of CMakePlatformId.h.in |
| + # inside 'defined(_WIN32) && defined(_MSC_VER)' |
| + if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64") |
| + string(APPEND _boost_ARCHITECTURE_TAG "i") |
| + elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86" |
| + OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64") |
| + string(APPEND _boost_ARCHITECTURE_TAG "x") |
| + elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM") |
| + string(APPEND _boost_ARCHITECTURE_TAG "a") |
| + elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS") |
| + string(APPEND _boost_ARCHITECTURE_TAG "m") |
| + endif() |
| + |
| + if(CMAKE_SIZEOF_VOID_P EQUAL 8) |
| + string(APPEND _boost_ARCHITECTURE_TAG "64") |
| + else() |
| + string(APPEND _boost_ARCHITECTURE_TAG "32") |
| + endif() |
| +endif() |
| + |
| if(Boost_DEBUG) |
| message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " |
| "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}") |
| @@ -1616,22 +1648,22 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT |
| 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}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION} |
| ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ) |
| endforeach() |
| list(APPEND _boost_RELEASE_NAMES |
| - ${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_ARCHITECTURE_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}${_boost_ARCHITECTURE_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_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
| + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION} |
| ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) |
| endif() |
| if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") |
| @@ -1666,11 +1698,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT |
| 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}${_boost_ARCHITECTURE_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_ARCHITECTURE_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} ) |
| @@ -1678,11 +1710,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT |
| 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}${_boost_ARCHITECTURE_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_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} |
| + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION} |
| ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) |
| endif() |
| if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") |