1From 881705ec581ab7cd61c8e4fe134db8854a83ec4e Mon Sep 17 00:00:00 2001
2From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
3Date: Tue, 28 Apr 2020 16:56:29 +0200
4Subject: [PATCH] host: CMakeLists: add boost unit_test_framework required only
5 when ENABLE_TESTS=ON
6
7By default, boost unit_test_framework is always required, but only use
8when ENABLE_TESTS=ON.
9This PR suppress unit_test_framework to the default list and append
10UHD_BOOST_REQUIRED_COMPONENTS when this library is needed
11
12Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
13[Fabrice: updated for 4.3.0.0]
14Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
15[Upstream status: reverted (https://github.com/EttusResearch/uhd/commit/1a00949b19eaecb84af0f27c370400dc71a9fd84)]
16---
17 host/CMakeLists.txt | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
21index 8f72ece76..a7731ffbd 100644
22--- a/host/CMakeLists.txt
23+++ b/host/CMakeLists.txt
24@@ -291,9 +291,12 @@ set(UHD_BOOST_REQUIRED_COMPONENTS
25     system
26     serialization
27     thread
28-    unit_test_framework
29 )
30
31+if(ENABLE_TESTS)
32+    list(APPEND UHD_BOOST_REQUIRED_COMPONENTS unit_test_framework)
33+endif(ENABLE_TESTS)
34+
35 include(UHDBoost)
36
37 include_directories(${Boost_INCLUDE_DIRS})
38--
392.26.2
40
41