0001-host-CMakeLists-add-boost-unit_test_framework-requir.patch 1.3 KB

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