buildroot/package/gnuradio/0001-add-boost-unit_test_framework-required-only-when-ENA.patch
Gwenhael Goavec-Merou 0d6a7b2981 package/gnuradio: bump to version 3.8.0.0
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- backport patch to have boost unit_test_framework optional instead of mandatory:
  https://github.com/gnuradio/gnuradio/pull/2927
- backport patch to fix neon version detection:
  https://github.com/gnuradio/volk/pull/319
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppress the no more available BR2_PACKAGE_GNURADIO_LOG, since log4cpp is mandatory. Since this
  option is now always true no need to add an entry in legacy.
- suppress all workaround for neon. Now volk is able to detect correctly neon
  version.
- add explictly path to python interpreter

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-02-03 23:43:33 +01:00

93 lines
2.9 KiB
Diff

From d6647680612276f2321cc6a83964e9264fca42a1 Mon Sep 17 00:00:00 2001
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Date: Wed, 15 Jan 2020 17:23:08 +0100
Subject: [PATCH] add boost unit_test_framework required only when
ENABLE_TESTING=ON
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
CMakeLists.txt | 7 +++----
cmake/Modules/GnuradioConfig.cmake.in | 16 +++++++++++++---
cmake/Modules/GrBoost.cmake | 5 ++++-
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a47a945f9..58add6136 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,9 @@ GR_CHECK_BUILD_TYPE(${CMAKE_BUILD_TYPE})
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
+include(GrComponent)
+GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING)
+
# Set the version information here
SET(VERSION_MAJOR 3)
SET(VERSION_API 8)
@@ -377,10 +380,6 @@ GR_REGISTER_COMPONENT("python-support" ENABLE_PYTHON
SIX_FOUND
)
-GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING
- Boost_FOUND
-)
-
if(${CMAKE_BUILD_TYPE} STREQUAL "Coverage")
include(CodeCoverage)
setup_target_for_coverage(coverage "ctest || exit 0" coverage)
diff --git a/cmake/Modules/GnuradioConfig.cmake.in b/cmake/Modules/GnuradioConfig.cmake.in
index 1e5ad20ec..f59e74b8b 100644
--- a/cmake/Modules/GnuradioConfig.cmake.in
+++ b/cmake/Modules/GnuradioConfig.cmake.in
@@ -24,15 +24,25 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")
find_dependency(LOG4CPP)
find_dependency(MPLIB)
-find_dependency(Boost "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" COMPONENTS
+
+set(BOOST_REQUIRED_COMPONENTS
date_time
program_options
filesystem
system
regex
thread
- unit_test_framework
- )
+)
+
+if (NOT ENABLE_TESTING)
+ set(ENABLE_TESTING @ENABLE_TESTING@ CACHE BOOL "Enable testing support")
+endif()
+
+if(ENABLE_TESTING)
+ list(APPEND BOOST_REQUIRED_COMPONENTS unit_test_framework)
+endif(ENABLE_TESTING)
+
+find_dependency(Boost "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
find_dependency(Volk)
set(ENABLE_PYTHON @ENABLE_PYTHON@ CACHE BOOL "Enable Python & SWIG")
if(${ENABLE_PYTHON})
diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake
index cd4b120f7..670e61054 100644
--- a/cmake/Modules/GrBoost.cmake
+++ b/cmake/Modules/GrBoost.cmake
@@ -33,9 +33,12 @@ set(BOOST_REQUIRED_COMPONENTS
system
regex
thread
- unit_test_framework
)
+if(ENABLE_TESTING)
+ list(APPEND BOOST_REQUIRED_COMPONENTS unit_test_framework)
+endif(ENABLE_TESTING)
+
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
--
2.24.1