All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cmake: fix build issue with boost 1.66.0
@ 2018-06-03 22:22 Armin Kuster
  2018-06-03 22:22 ` [PATCH 2/2] cmake: fix build issue with boost 1.67.0 Armin Kuster
  0 siblings, 1 reply; 3+ messages in thread
From: Armin Kuster @ 2018-06-03 22:22 UTC (permalink / raw
  To: akuster808, openembedded-core

this fixes a build issue with boost 1.66.0

[Yocto 12762]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/recipes-devtools/cmake/cmake.inc              |   4 +
 ...oost-1.66.0-dependency-and-release-update.patch |  52 ++++++++
 ...ix-incorrect-alphabetisation-of-headers-l.patch |  29 +++++
 ...mplement-Architecture-and-Address-Model-t.patch | 132 +++++++++++++++++++++
 ...earch-for-upstream-packaged-libs-next-to-.patch |  31 +++++
 5 files changed, 248 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch

diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 9357079..394c9eb 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -16,6 +16,10 @@ SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
            file://cmake-Prevent-the-detection-of-Qt5.patch \
+           file://0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch \
+           file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
+           file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
+           file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
            "
 
 SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch b/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
new file mode 100644
index 0000000..fda60e3
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
@@ -0,0 +1,52 @@
+From 433a2d495a2481c63b82c11a30f7c642d6abe63f Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 19:55:49 +1100
+Subject: [PATCH] FindBoost: Boost 1.66.0 dependency and release update
+
+Release notes: http://www.boost.org/users/history/version_1_66_0.html
+
+* All new libraries are header-only.
+* _Boost_COMPONENT_DEPENDENCIES is unchanged from 1.65.1
+* _Boost_FIBER_COMPILER_FEATURES is unchanged from 1.64.0
+
+Upstream-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -797,7 +797,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+       set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+     endif()
+-    if(NOT Boost_VERSION VERSION_LESS 106600)
++    if(NOT Boost_VERSION VERSION_LESS 106700)
+       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+       set(_Boost_IMPORTED_TARGETS FALSE)
+     endif()
+@@ -931,8 +931,8 @@ endfunction()
+ # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+ #
+ function(_Boost_COMPILER_FEATURES component _ret)
+-  # Boost >= 1.62 and < 1.65
+-  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500)
++  # Boost >= 1.62 and < 1.67
++  if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+     set(_Boost_FIBER_COMPILER_FEATURES
+         cxx_alias_templates
+         cxx_auto_type
+@@ -1038,7 +1038,7 @@ else()
+   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
+   # _Boost_COMPONENT_DEPENDENCIES.
+   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+-    "1.65.1" "1.65.0" "1.65"
++    "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch b/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
new file mode 100644
index 0000000..a45eda5
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
@@ -0,0 +1,29 @@
+From b1e9f67137733bc109d355450fcd06edda4784c5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 20:07:31 +1100
+Subject: [PATCH 1/6] FindBoost: Fix incorrect alphabetisation of headers list
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -831,8 +831,8 @@ function(_Boost_COMPONENT_HEADERS compon
+   set(_Boost_CONTAINER_HEADERS           "boost/container/container_fwd.hpp")
+   set(_Boost_CONTEXT_HEADERS             "boost/context/all.hpp")
+   set(_Boost_COROUTINE_HEADERS           "boost/coroutine/all.hpp")
+-  set(_Boost_EXCEPTION_HEADERS           "boost/exception/exception.hpp")
+   set(_Boost_DATE_TIME_HEADERS           "boost/date_time/date.hpp")
++  set(_Boost_EXCEPTION_HEADERS           "boost/exception/exception.hpp")
+   set(_Boost_FIBER_HEADERS               "boost/fiber/all.hpp")
+   set(_Boost_FILESYSTEM_HEADERS          "boost/filesystem/path.hpp")
+   set(_Boost_GRAPH_HEADERS               "boost/graph/adjacency_list.hpp")
diff --git a/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch b/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
new file mode 100644
index 0000000..88301c6
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
@@ -0,0 +1,132 @@
+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")
diff --git a/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch b/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
new file mode 100644
index 0000000..5178f5c
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
@@ -0,0 +1,31 @@
+From d56deff7d127b030739bd0034609d0046121d8cd Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 22:38:36 +1100
+Subject: [PATCH 3/6] FindBoost: Search for upstream-packaged libs next to
+ includes
+
+Upstream packages Boost binaries for Windows with the 'boost' directory
+(the INCLUDE_DIR) next to the lib-... directory (the LIBRARY_DIR).
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1502,6 +1502,7 @@ foreach(c DEBUG RELEASE)
+       ${Boost_INCLUDE_DIR}/stage/lib
+       )
+     _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
++    _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}")
+     if( Boost_NO_SYSTEM_PATHS )
+       list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+     else()
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] cmake: fix build issue with boost 1.67.0
  2018-06-03 22:22 [PATCH 1/2] cmake: fix build issue with boost 1.66.0 Armin Kuster
@ 2018-06-03 22:22 ` Armin Kuster
  2018-06-07 21:26   ` Andrea Adami
  0 siblings, 1 reply; 3+ messages in thread
From: Armin Kuster @ 2018-06-03 22:22 UTC (permalink / raw
  To: akuster808, openembedded-core

this fixes a build issue with boost 1.67.0

[Yocto 12762]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/recipes-devtools/cmake/cmake.inc              |   3 +
 ...enerate-imported-targets-for-future-Boost.patch |  35 +++
 ...005-FindBoost-support-OPTIONAL_COMPONENTS.patch |  42 +++
 ...dd-support-for-Boost-1.67-with-Python-ver.patch | 296 +++++++++++++++++++++
 4 files changed, 376 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch

diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 394c9eb..533db6a 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -20,6 +20,9 @@ SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
            file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
            file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
+           file://0004-FindBoost-Generate-imported-targets-for-future-Boost.patch \
+           file://0005-FindBoost-support-OPTIONAL_COMPONENTS.patch \
+           file://0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch \
            "
 
 SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
diff --git a/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch b/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
new file mode 100644
index 0000000..bec04c4
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
@@ -0,0 +1,35 @@
+From 6297d6c7fd6f80dafe17c0aefeeb0439432aa4b0 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Sat, 30 Dec 2017 16:00:29 +1100
+Subject: [PATCH 4/6] FindBoost: Generate imported targets for future Boost
+ versions
+
+Per discussion on cmake/cmake#17575, this protection not particularly
+valuable, as the dependency information which the imported targets wrap
+is generated anyway.
+
+This removes a road-block for using `Boost_ADDITIONAL_VERSIONS` to
+support newly-released Boost versions pending a new CMake release.
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 1 -
+ 1 file changed, 1 deletion(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -799,7 +799,6 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+     endif()
+     if(NOT Boost_VERSION VERSION_LESS 106700)
+       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+-      set(_Boost_IMPORTED_TARGETS FALSE)
+     endif()
+   endif()
+ 
diff --git a/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch b/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
new file mode 100644
index 0000000..37d69ba
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
@@ -0,0 +1,42 @@
+From 2557cad5ec5084f86d4bb56c82939a49fc9d3071 Mon Sep 17 00:00:00 2001
+From: Sergiu Deitsch <sergiu.deitsch@gmail.com>
+Date: Sun, 14 Jan 2018 11:42:48 +0100
+Subject: [PATCH 5/6] FindBoost: support OPTIONAL_COMPONENTS
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -13,6 +13,9 @@
+ #     [version] [EXACT]      # Minimum or EXACT version e.g. 1.36.0
+ #     [REQUIRED]             # Fail with error if Boost is not found
+ #     [COMPONENTS <libs>...] # Boost libraries by their canonical name
++#                            # e.g. "date_time" for "libboost_date_time"
++#     [OPTIONAL_COMPONENTS <libs>...]
++#                            # Optional Boost libraries by their canonical name)
+ #     )                      # e.g. "date_time" for "libboost_date_time"
+ #
+ # This module finds headers and requested component libraries OR a CMake
+@@ -1783,10 +1786,9 @@ if(Boost_FOUND)
+   set(_boost_CHECKED_COMPONENT FALSE)
+   set(_Boost_MISSING_COMPONENTS "")
+   foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+-    string(TOUPPER ${COMPONENT} COMPONENT)
++    string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+     set(_boost_CHECKED_COMPONENT TRUE)
+-    if(NOT Boost_${COMPONENT}_FOUND)
+-      string(TOLOWER ${COMPONENT} COMPONENT)
++    if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT})
+       list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
+     endif()
+   endforeach()
diff --git a/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch b/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch
new file mode 100644
index 0000000..d25cd35
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch
@@ -0,0 +1,296 @@
+From 1673923c303c6a4184904c4c5849911feddb87e7 Mon Sep 17 00:00:00 2001
+From: Roger Leigh <rleigh@codelibre.net>
+Date: Sun, 18 Mar 2018 13:05:35 +0000
+Subject: [PATCH 6/6] FindBoost: Add support for Boost 1.67 with Python version
+ suffixes
+
+Fixes: #16612, #16335, #16391, #12955
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 170 ++++++++++++++++++++++++++++++++++++------------
+ 1 file changed, 129 insertions(+), 41 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -10,7 +10,7 @@
+ # Use this module by invoking find_package with the form::
+ #
+ #   find_package(Boost
+-#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.36.0
++#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
+ #     [REQUIRED]             # Fail with error if Boost is not found
+ #     [COMPONENTS <libs>...] # Boost libraries by their canonical name
+ #                            # e.g. "date_time" for "libboost_date_time"
+@@ -40,6 +40,15 @@
+ #                            information about Boost's automatic linking
+ #                            displayed during compilation
+ #
++# Note that Boost Python components require a Python version suffix
++# (Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
++# versions built against Python 3.6 and 2.7, respectively.  This also
++# applies to additional components using Python including
++# ``mpi_python`` and ``numpy``.  Earlier Boost releases may use
++# distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
++# These may also be used as suffixes, but note that they are not
++# portable.
++#
+ # This module reads hints about search locations from variables::
+ #
+ #   BOOST_ROOT             - Preferred installation prefix
+@@ -156,7 +165,7 @@
+ #   Boost_REALPATH           - Set to ON to resolve symlinks for discovered
+ #                              libraries to assist with packaging.  For example,
+ #                              the "system" component library may be resolved to
+-#                              "/usr/lib/libboost_system.so.1.42.0" instead of
++#                              "/usr/lib/libboost_system.so.1.67.0" instead of
+ #                              "/usr/lib/libboost_system.so".  This does not
+ #                              affect linking and should not be enabled unless
+ #                              the user needs this information.
+@@ -190,6 +199,13 @@
+ #   target_link_libraries(foo Boost::date_time Boost::filesystem
+ #                             Boost::iostreams)
+ #
++# Example to find Boost Python 3.6 libraries and use imported targets::
++#
++#   find_package(Boost 1.67 REQUIRED COMPONENTS
++#                python36 numpy36)
++#   add_executable(foo foo.cc)
++#   target_link_libraries(foo Boost::python36 Boost::numpy36)
++#
+ # Example to find Boost headers and some *static* (release only) libraries::
+ #
+ #   set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
+@@ -197,7 +213,7 @@
+ #   set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
+ #   set(Boost_USE_MULTITHREADED      ON)
+ #   set(Boost_USE_STATIC_RUNTIME    OFF)
+-#   find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
++#   find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
+ #   if(Boost_FOUND)
+ #     include_directories(${Boost_INCLUDE_DIRS})
+ #     add_executable(foo foo.cc)
+@@ -565,6 +581,13 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+   # required only if the BoostScanDeps.cmake script logic is changed.
+   # The addition of a new release should only require it to be run
+   # against the new release.
++
++  # Handle Python version suffixes
++  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
++    set(component "${CMAKE_MATCH_1}")
++    set(component_python_version "${CMAKE_MATCH_2}")
++  endif()
++
+   set(_Boost_IMPORTED_TARGETS TRUE)
+   if(Boost_VERSION VERSION_LESS 103300)
+     message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
+@@ -782,8 +805,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+-  else()
+-    if(NOT Boost_VERSION VERSION_LESS 106500)
++  elseif(NOT Boost_VERSION VERSION_LESS 106500 AND Boost_VERSION VERSION_LESS 106700)
+       set(_Boost_CHRONO_DEPENDENCIES system)
+       set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+       set(_Boost_COROUTINE_DEPENDENCIES context system)
+@@ -797,10 +819,29 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+       set(_Boost_NUMPY_DEPENDENCIES python)
+       set(_Boost_RANDOM_DEPENDENCIES system)
+       set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
++      set(_Boost_TIMER_DEPENDENCIES chrono system)
+       set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+-    endif()
++  else()
+     if(NOT Boost_VERSION VERSION_LESS 106700)
++      set(_Boost_CHRONO_DEPENDENCIES system)
++      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
++      set(_Boost_COROUTINE_DEPENDENCIES context system)
++      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
++      set(_Boost_FILESYSTEM_DEPENDENCIES system)
++      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
++      set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
++      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
++      set(_Boost_MPI_DEPENDENCIES serialization)
++      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
++      set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
++      set(_Boost_RANDOM_DEPENDENCIES system)
++      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
++      set(_Boost_TIMER_DEPENDENCIES chrono system)
++      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
++      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
++    endif()
++    if(NOT Boost_VERSION VERSION_LESS 106800)
+       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+     endif()
+   endif()
+@@ -826,6 +867,12 @@ endfunction()
+ # _hdrs
+ #
+ function(_Boost_COMPONENT_HEADERS component _hdrs)
++  # Handle Python version suffixes
++  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
++    set(component "${CMAKE_MATCH_1}")
++    set(component_python_version "${CMAKE_MATCH_2}")
++  endif()
++
+   # Note: new boost components will require adding here.  The header
+   # must be present in all versions of Boost providing a library.
+   set(_Boost_ATOMIC_HEADERS              "boost/atomic.hpp")
+@@ -1040,7 +1087,7 @@ else()
+   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
+   # _Boost_COMPONENT_DEPENDENCIES.
+   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+-    "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
++    "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
+@@ -1619,7 +1666,44 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+     endforeach()
+   endif()
+ 
++  # Handle Python version suffixes
++  unset(COMPONENT_PYTHON_VERSION_MAJOR)
++  unset(COMPONENT_PYTHON_VERSION_MINOR)
++  if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
++    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
++    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
++  elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
++    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
++    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
++    set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")
++  endif()
++
++  unset(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
++  if (COMPONENT_PYTHON_VERSION_MINOR)
++    # Boost >= 1.67
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
++    # Debian/Ubuntu (Some versions omit the 2 and/or 3 from the suffix)
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
++    # Gentoo
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
++    # RPMs
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
++  endif()
++  if (COMPONENT_PYTHON_VERSION_MAJOR AND NOT COMPONENT_PYTHON_VERSION_MINOR)
++    # Boost < 1.67
++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}")
++  endif()
++
+   # Consolidate and report component-specific hints.
++  if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
++    list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
++    if(Boost_DEBUG)
++      message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
++        "Component-specific library search names for ${COMPONENT_NAME}: "
++        "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME}")
++    endif()
++  endif()
+   if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
+     list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
+     if(Boost_DEBUG)
+@@ -1649,28 +1733,30 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+   # 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_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_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(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
+     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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
++        ${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_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+-  endif()
++      ${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_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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
++    endif()
++  endforeach()
+   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+-     _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
++    _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+   endif()
+   if(Boost_DEBUG)
+     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+@@ -1699,27 +1785,29 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+   # Find DEBUG libraries
+   #
+   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_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_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} )
+-  if(_boost_STATIC_RUNTIME_WORKAROUND)
+-    set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
++  foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
+     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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
++        ${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_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+-  endif()
++      ${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} )
++    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_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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
++    endif()
++  endforeach()
+   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+      _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
+   endif()
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] cmake: fix build issue with boost 1.67.0
  2018-06-03 22:22 ` [PATCH 2/2] cmake: fix build issue with boost 1.67.0 Armin Kuster
@ 2018-06-07 21:26   ` Andrea Adami
  0 siblings, 0 replies; 3+ messages in thread
From: Andrea Adami @ 2018-06-07 21:26 UTC (permalink / raw
  To: Armin Kuster; +Cc: Patches and discussions about the oe-core layer

Armin,

I pulled yesterday and all was okay.
After today's pull I see

| [ 43%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmDefinitions.cxx.o
| cd /tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build/Source
&& /tmp/build/tmp-musl/hosttools/g++  -DCMAKE_BUILD_WITH_CMAKE
-DLIBARCHIVE_STATIC
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build/Utilities
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Utilities
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build/Source
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Source
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Source/LexerParser
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/recipe-sysroot-native/usr/include
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build/Utilities/cmcompress
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Source/CTest
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Source/CPack
-I/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build/Source/kwsys
 -isystem/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/recipe-sysroot-native/usr/include
-O2 -pipe   -std=gnu++14 -o
CMakeFiles/CMakeLib.dir/cmDefinitions.cxx.o -c
/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/cmake-3.10.3/Source/cmDefinitions.cxx
| g++: internal compiler error: Killed (program cc1plus)
| Please submit a full bug report,
| with preprocessed source if appropriate.
| See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
| Source/CMakeFiles/CMakeLib.dir/build.make:449: recipe for target
'Source/CMakeFiles/CMakeLib.dir/cmComputeLinkDepends.cxx.o' failed
| make[2]: *** [Source/CMakeFiles/CMakeLib.dir/cmComputeLinkDepends.cxx.o]
Error 4
| make[2]: *** Deleting file
'Source/CMakeFiles/CMakeLib.dir/cmComputeLinkDepends.cxx.o'
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory
'/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build'
| CMakeFiles/Makefile2:1857: recipe for target
'Source/CMakeFiles/CMakeLib.dir/all' failed
| make[1]: *** [Source/CMakeFiles/CMakeLib.dir/all] Error 2
| make[1]: Leaving directory
'/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/build'
| ERROR: oe_runmake failed
| Makefile:165: recipe for target 'all' failed
| make: *** [all] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at
/tmp/build/tmp-musl/work/x86_64-linux/cmake-native/3.10.3-r0/temp/log.do_compile.27255)
ERROR: Task (/oe/oe-core/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb:do_compile)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 2162 tasks of which 1363 didn't need to
be rerun and 1 failed.

git revert 04f367e27e66105466611bee4d63abc78e0a4725
and cmake-native builds fine again.

To repeat this, I did restore with

git reset --hard HEAD^1

and surprise, it now builds with the patch applied.
Doh!

Andrea

On Mon, Jun 4, 2018 at 12:22 AM, Armin Kuster <akuster808@gmail.com> wrote:
> this fixes a build issue with boost 1.67.0
>
> [Yocto 12762]
>
> Signed-off-by: Armin Kuster <akuster808@gmail.com>
> ---
>  meta/recipes-devtools/cmake/cmake.inc              |   3 +
>  ...enerate-imported-targets-for-future-Boost.patch |  35 +++
>  ...005-FindBoost-support-OPTIONAL_COMPONENTS.patch |  42 +++
>  ...dd-support-for-Boost-1.67-with-Python-ver.patch | 296 +++++++++++++++++++++
>  4 files changed, 376 insertions(+)
>  create mode 100644 meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
>  create mode 100644 meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
>  create mode 100644 meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch
>
> diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
> index 394c9eb..533db6a 100644
> --- a/meta/recipes-devtools/cmake/cmake.inc
> +++ b/meta/recipes-devtools/cmake/cmake.inc
> @@ -20,6 +20,9 @@ SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
>             file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
>             file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
>             file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
> +           file://0004-FindBoost-Generate-imported-targets-for-future-Boost.patch \
> +           file://0005-FindBoost-support-OPTIONAL_COMPONENTS.patch \
> +           file://0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch \
>             "
>
>  SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
> diff --git a/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch b/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
> new file mode 100644
> index 0000000..bec04c4
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake/0004-FindBoost-Generate-imported-targets-for-future-Boost.patch
> @@ -0,0 +1,35 @@
> +From 6297d6c7fd6f80dafe17c0aefeeb0439432aa4b0 Mon Sep 17 00:00:00 2001
> +From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
> +Date: Sat, 30 Dec 2017 16:00:29 +1100
> +Subject: [PATCH 4/6] FindBoost: Generate imported targets for future Boost
> + versions
> +
> +Per discussion on cmake/cmake#17575, this protection not particularly
> +valuable, as the dependency information which the imported targets wrap
> +is generated anyway.
> +
> +This removes a road-block for using `Boost_ADDITIONAL_VERSIONS` to
> +support newly-released Boost versions pending a new CMake release.
> +
> +Affects cmake < 3.11.0
> +
> +Upsteam-Status: Backport
> +[Yocto 12762]
> +Signed-off-by: Armin Kuster <akuster808@gmail.com>
> +
> +---
> + Modules/FindBoost.cmake | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +Index: cmake-3.10.3/Modules/FindBoost.cmake
> +===================================================================
> +--- cmake-3.10.3.orig/Modules/FindBoost.cmake
> ++++ cmake-3.10.3/Modules/FindBoost.cmake
> +@@ -799,7 +799,6 @@ function(_Boost_COMPONENT_DEPENDENCIES c
> +     endif()
> +     if(NOT Boost_VERSION VERSION_LESS 106700)
> +       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
> +-      set(_Boost_IMPORTED_TARGETS FALSE)
> +     endif()
> +   endif()
> +
> diff --git a/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch b/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
> new file mode 100644
> index 0000000..37d69ba
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
> @@ -0,0 +1,42 @@
> +From 2557cad5ec5084f86d4bb56c82939a49fc9d3071 Mon Sep 17 00:00:00 2001
> +From: Sergiu Deitsch <sergiu.deitsch@gmail.com>
> +Date: Sun, 14 Jan 2018 11:42:48 +0100
> +Subject: [PATCH 5/6] FindBoost: support OPTIONAL_COMPONENTS
> +
> +Affects cmake < 3.11.0
> +
> +Upsteam-Status: Backport
> +[Yocto 12762]
> +Signed-off-by: Armin Kuster <akuster808@gmail.com>
> +
> +---
> + Modules/FindBoost.cmake | 8 +++++---
> + 1 file changed, 5 insertions(+), 3 deletions(-)
> +
> +Index: cmake-3.10.3/Modules/FindBoost.cmake
> +===================================================================
> +--- cmake-3.10.3.orig/Modules/FindBoost.cmake
> ++++ cmake-3.10.3/Modules/FindBoost.cmake
> +@@ -13,6 +13,9 @@
> + #     [version] [EXACT]      # Minimum or EXACT version e.g. 1.36.0
> + #     [REQUIRED]             # Fail with error if Boost is not found
> + #     [COMPONENTS <libs>...] # Boost libraries by their canonical name
> ++#                            # e.g. "date_time" for "libboost_date_time"
> ++#     [OPTIONAL_COMPONENTS <libs>...]
> ++#                            # Optional Boost libraries by their canonical name)
> + #     )                      # e.g. "date_time" for "libboost_date_time"
> + #
> + # This module finds headers and requested component libraries OR a CMake
> +@@ -1783,10 +1786,9 @@ if(Boost_FOUND)
> +   set(_boost_CHECKED_COMPONENT FALSE)
> +   set(_Boost_MISSING_COMPONENTS "")
> +   foreach(COMPONENT ${Boost_FIND_COMPONENTS})
> +-    string(TOUPPER ${COMPONENT} COMPONENT)
> ++    string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
> +     set(_boost_CHECKED_COMPONENT TRUE)
> +-    if(NOT Boost_${COMPONENT}_FOUND)
> +-      string(TOLOWER ${COMPONENT} COMPONENT)
> ++    if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT})
> +       list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
> +     endif()
> +   endforeach()
> diff --git a/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch b/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch
> new file mode 100644
> index 0000000..d25cd35
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake/0006-FindBoost-Add-support-for-Boost-1.67-with-Python-ver.patch
> @@ -0,0 +1,296 @@
> +From 1673923c303c6a4184904c4c5849911feddb87e7 Mon Sep 17 00:00:00 2001
> +From: Roger Leigh <rleigh@codelibre.net>
> +Date: Sun, 18 Mar 2018 13:05:35 +0000
> +Subject: [PATCH 6/6] FindBoost: Add support for Boost 1.67 with Python version
> + suffixes
> +
> +Fixes: #16612, #16335, #16391, #12955
> +
> +Affects cmake < 3.11.0
> +
> +Upsteam-Status: Backport
> +[Yocto 12762]
> +Signed-off-by: Armin Kuster <akuster808@gmail.com>
> +
> +---
> + Modules/FindBoost.cmake | 170 ++++++++++++++++++++++++++++++++++++------------
> + 1 file changed, 129 insertions(+), 41 deletions(-)
> +
> +Index: cmake-3.10.3/Modules/FindBoost.cmake
> +===================================================================
> +--- cmake-3.10.3.orig/Modules/FindBoost.cmake
> ++++ cmake-3.10.3/Modules/FindBoost.cmake
> +@@ -10,7 +10,7 @@
> + # Use this module by invoking find_package with the form::
> + #
> + #   find_package(Boost
> +-#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.36.0
> ++#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
> + #     [REQUIRED]             # Fail with error if Boost is not found
> + #     [COMPONENTS <libs>...] # Boost libraries by their canonical name
> + #                            # e.g. "date_time" for "libboost_date_time"
> +@@ -40,6 +40,15 @@
> + #                            information about Boost's automatic linking
> + #                            displayed during compilation
> + #
> ++# Note that Boost Python components require a Python version suffix
> ++# (Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
> ++# versions built against Python 3.6 and 2.7, respectively.  This also
> ++# applies to additional components using Python including
> ++# ``mpi_python`` and ``numpy``.  Earlier Boost releases may use
> ++# distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
> ++# These may also be used as suffixes, but note that they are not
> ++# portable.
> ++#
> + # This module reads hints about search locations from variables::
> + #
> + #   BOOST_ROOT             - Preferred installation prefix
> +@@ -156,7 +165,7 @@
> + #   Boost_REALPATH           - Set to ON to resolve symlinks for discovered
> + #                              libraries to assist with packaging.  For example,
> + #                              the "system" component library may be resolved to
> +-#                              "/usr/lib/libboost_system.so.1.42.0" instead of
> ++#                              "/usr/lib/libboost_system.so.1.67.0" instead of
> + #                              "/usr/lib/libboost_system.so".  This does not
> + #                              affect linking and should not be enabled unless
> + #                              the user needs this information.
> +@@ -190,6 +199,13 @@
> + #   target_link_libraries(foo Boost::date_time Boost::filesystem
> + #                             Boost::iostreams)
> + #
> ++# Example to find Boost Python 3.6 libraries and use imported targets::
> ++#
> ++#   find_package(Boost 1.67 REQUIRED COMPONENTS
> ++#                python36 numpy36)
> ++#   add_executable(foo foo.cc)
> ++#   target_link_libraries(foo Boost::python36 Boost::numpy36)
> ++#
> + # Example to find Boost headers and some *static* (release only) libraries::
> + #
> + #   set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
> +@@ -197,7 +213,7 @@
> + #   set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
> + #   set(Boost_USE_MULTITHREADED      ON)
> + #   set(Boost_USE_STATIC_RUNTIME    OFF)
> +-#   find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
> ++#   find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
> + #   if(Boost_FOUND)
> + #     include_directories(${Boost_INCLUDE_DIRS})
> + #     add_executable(foo foo.cc)
> +@@ -565,6 +581,13 @@ function(_Boost_COMPONENT_DEPENDENCIES c
> +   # required only if the BoostScanDeps.cmake script logic is changed.
> +   # The addition of a new release should only require it to be run
> +   # against the new release.
> ++
> ++  # Handle Python version suffixes
> ++  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
> ++    set(component "${CMAKE_MATCH_1}")
> ++    set(component_python_version "${CMAKE_MATCH_2}")
> ++  endif()
> ++
> +   set(_Boost_IMPORTED_TARGETS TRUE)
> +   if(Boost_VERSION VERSION_LESS 103300)
> +     message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
> +@@ -782,8 +805,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
> +     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
> +     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
> +     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
> +-  else()
> +-    if(NOT Boost_VERSION VERSION_LESS 106500)
> ++  elseif(NOT Boost_VERSION VERSION_LESS 106500 AND Boost_VERSION VERSION_LESS 106700)
> +       set(_Boost_CHRONO_DEPENDENCIES system)
> +       set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
> +       set(_Boost_COROUTINE_DEPENDENCIES context system)
> +@@ -797,10 +819,29 @@ function(_Boost_COMPONENT_DEPENDENCIES c
> +       set(_Boost_NUMPY_DEPENDENCIES python)
> +       set(_Boost_RANDOM_DEPENDENCIES system)
> +       set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
> ++      set(_Boost_TIMER_DEPENDENCIES chrono system)
> +       set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
> +       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
> +-    endif()
> ++  else()
> +     if(NOT Boost_VERSION VERSION_LESS 106700)
> ++      set(_Boost_CHRONO_DEPENDENCIES system)
> ++      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
> ++      set(_Boost_COROUTINE_DEPENDENCIES context system)
> ++      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
> ++      set(_Boost_FILESYSTEM_DEPENDENCIES system)
> ++      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
> ++      set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
> ++      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
> ++      set(_Boost_MPI_DEPENDENCIES serialization)
> ++      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
> ++      set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
> ++      set(_Boost_RANDOM_DEPENDENCIES system)
> ++      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
> ++      set(_Boost_TIMER_DEPENDENCIES chrono system)
> ++      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
> ++      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
> ++    endif()
> ++    if(NOT Boost_VERSION VERSION_LESS 106800)
> +       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
> +     endif()
> +   endif()
> +@@ -826,6 +867,12 @@ endfunction()
> + # _hdrs
> + #
> + function(_Boost_COMPONENT_HEADERS component _hdrs)
> ++  # Handle Python version suffixes
> ++  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
> ++    set(component "${CMAKE_MATCH_1}")
> ++    set(component_python_version "${CMAKE_MATCH_2}")
> ++  endif()
> ++
> +   # Note: new boost components will require adding here.  The header
> +   # must be present in all versions of Boost providing a library.
> +   set(_Boost_ATOMIC_HEADERS              "boost/atomic.hpp")
> +@@ -1040,7 +1087,7 @@ else()
> +   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
> +   # _Boost_COMPONENT_DEPENDENCIES.
> +   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
> +-    "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
> ++    "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
> +     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
> +     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
> +     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
> +@@ -1619,7 +1666,44 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
> +     endforeach()
> +   endif()
> +
> ++  # Handle Python version suffixes
> ++  unset(COMPONENT_PYTHON_VERSION_MAJOR)
> ++  unset(COMPONENT_PYTHON_VERSION_MINOR)
> ++  if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
> ++    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
> ++    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
> ++  elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
> ++    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
> ++    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
> ++    set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")
> ++  endif()
> ++
> ++  unset(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
> ++  if (COMPONENT_PYTHON_VERSION_MINOR)
> ++    # Boost >= 1.67
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
> ++    # Debian/Ubuntu (Some versions omit the 2 and/or 3 from the suffix)
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
> ++    # Gentoo
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
> ++    # RPMs
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
> ++  endif()
> ++  if (COMPONENT_PYTHON_VERSION_MAJOR AND NOT COMPONENT_PYTHON_VERSION_MINOR)
> ++    # Boost < 1.67
> ++    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}")
> ++  endif()
> ++
> +   # Consolidate and report component-specific hints.
> ++  if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
> ++    list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
> ++    if(Boost_DEBUG)
> ++      message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
> ++        "Component-specific library search names for ${COMPONENT_NAME}: "
> ++        "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME}")
> ++    endif()
> ++  endif()
> +   if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
> +     list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
> +     if(Boost_DEBUG)
> +@@ -1649,28 +1733,30 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
> +   # 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_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_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(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
> +     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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> +-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
> ++        ${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_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> +-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
> +-  endif()
> ++      ${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_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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> ++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
> ++    endif()
> ++  endforeach()
> +   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
> +-     _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
> ++    _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
> +   endif()
> +   if(Boost_DEBUG)
> +     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
> +@@ -1699,27 +1785,29 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
> +   # Find DEBUG libraries
> +   #
> +   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_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_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} )
> +-  if(_boost_STATIC_RUNTIME_WORKAROUND)
> +-    set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
> ++  foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
> +     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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> +-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
> ++        ${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_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> +-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
> +-  endif()
> ++      ${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} )
> ++    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_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_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
> ++        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
> ++    endif()
> ++  endforeach()
> +   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
> +      _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
> +   endif()
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-07 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-03 22:22 [PATCH 1/2] cmake: fix build issue with boost 1.66.0 Armin Kuster
2018-06-03 22:22 ` [PATCH 2/2] cmake: fix build issue with boost 1.67.0 Armin Kuster
2018-06-07 21:26   ` Andrea Adami

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.