blob: c0330fb335a1ae6e020a33105c58fcabc568d18f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
Upstream-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()
|