Files
poky/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
T
Armin Kuster dd475f1d04 cmake: fix build issue with boost 1.67.0
this fixes a build issue with boost 1.67.0

[Yocto 12762]

(From OE-Core rev: 04f367e27e66105466611bee4d63abc78e0a4725)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-07 08:52:55 +01:00

43 lines
1.7 KiB
Diff

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()