summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch')
-rw-r--r--meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch42
1 files changed, 42 insertions, 0 deletions
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 0000000000..37d69ba080
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0005-FindBoost-support-OPTIONAL_COMPONENTS.patch
@@ -0,0 +1,42 @@
1From 2557cad5ec5084f86d4bb56c82939a49fc9d3071 Mon Sep 17 00:00:00 2001
2From: Sergiu Deitsch <sergiu.deitsch@gmail.com>
3Date: Sun, 14 Jan 2018 11:42:48 +0100
4Subject: [PATCH 5/6] FindBoost: support OPTIONAL_COMPONENTS
5
6Affects cmake < 3.11.0
7
8Upsteam-Status: Backport
9[Yocto 12762]
10Signed-off-by: Armin Kuster <akuster808@gmail.com>
11
12---
13 Modules/FindBoost.cmake | 8 +++++---
14 1 file changed, 5 insertions(+), 3 deletions(-)
15
16Index: cmake-3.10.3/Modules/FindBoost.cmake
17===================================================================
18--- cmake-3.10.3.orig/Modules/FindBoost.cmake
19+++ cmake-3.10.3/Modules/FindBoost.cmake
20@@ -13,6 +13,9 @@
21 # [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
22 # [REQUIRED] # Fail with error if Boost is not found
23 # [COMPONENTS <libs>...] # Boost libraries by their canonical name
24+# # e.g. "date_time" for "libboost_date_time"
25+# [OPTIONAL_COMPONENTS <libs>...]
26+# # Optional Boost libraries by their canonical name)
27 # ) # e.g. "date_time" for "libboost_date_time"
28 #
29 # This module finds headers and requested component libraries OR a CMake
30@@ -1783,10 +1786,9 @@ if(Boost_FOUND)
31 set(_boost_CHECKED_COMPONENT FALSE)
32 set(_Boost_MISSING_COMPONENTS "")
33 foreach(COMPONENT ${Boost_FIND_COMPONENTS})
34- string(TOUPPER ${COMPONENT} COMPONENT)
35+ string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
36 set(_boost_CHECKED_COMPONENT TRUE)
37- if(NOT Boost_${COMPONENT}_FOUND)
38- string(TOLOWER ${COMPONENT} COMPONENT)
39+ if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT})
40 list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
41 endif()
42 endforeach()