Drop boost::chrono in favor of std::chrono
The new GNU Radio linkage system seems that has some issues. There are linkage dependencies that they should be private on the GNU Radio target. In addition, find_package(Boost) is also called on the gnuradio-runtime target. Calling it again in the OOT module overwrites the existing list of dependencies, causing many problems. We are staring a process of dropping Boost and use the C++11 variants.
This commit is contained in:
parent
303b26db62
commit
2a03fc66bf
|
@ -85,29 +85,9 @@ else()
|
|||
message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.")
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# Find boost
|
||||
########################################################################
|
||||
if(UNIX AND EXISTS "/usr/lib64")
|
||||
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
|
||||
endif(UNIX AND EXISTS "/usr/lib64")
|
||||
set(Boost_ADDITIONAL_VERSIONS
|
||||
"1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54"
|
||||
"1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
|
||||
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
|
||||
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
|
||||
)
|
||||
find_package(Boost "1.54"
|
||||
COMPONENTS filesystem system unit_test_framework thread chrono)
|
||||
|
||||
if(NOT Boost_FOUND)
|
||||
message(FATAL_ERROR "Boost required to compile satnogs")
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# Find gnuradio build dependencies
|
||||
########################################################################
|
||||
find_package (Threads REQUIRED)
|
||||
find_package(PythonLibs 3)
|
||||
|
||||
find_package(Gnuradio "3.8" REQUIRED runtime fft blocks filter analog digital)
|
||||
|
|
|
@ -7,18 +7,27 @@ Build-Depends: cmake,
|
|||
dh-python,
|
||||
doxygen,
|
||||
git,
|
||||
gnuradio-dev (>=3.7.10),
|
||||
build-essential,
|
||||
gnuradio-dev (>=3.8.0),
|
||||
libboost-dev,
|
||||
libboost-date-time-dev,
|
||||
libboost-filesystem-dev,
|
||||
libboost-program-options-dev,
|
||||
libboost-system-dev,
|
||||
liblog4cpp5-dev,
|
||||
libnova-dev,
|
||||
libboost-thread-dev,
|
||||
libboost-regex-dev,
|
||||
libboost-test-dev,
|
||||
libpng++-dev,
|
||||
libvorbis-dev,
|
||||
pkg-config,
|
||||
python-dev,
|
||||
swig
|
||||
X-Python-Version: >= 2.7, << 2.8
|
||||
python3-dev,
|
||||
swig,
|
||||
libgmp-dev,
|
||||
liborc-0.4-0,
|
||||
liborc-0.4-dev,
|
||||
liborc-0.4-dev-bin,
|
||||
liblog4cpp5-dev
|
||||
X-Python-Version: >= 3.0,
|
||||
Standards-Version: 3.9.8
|
||||
Homepage: https://gitlab.com/librespacefoundation/satnogs/gr-satnogs
|
||||
Vcs-Git: https://gitlab.com/librespacefoundation/satnogs/gr-satnogs.git
|
||||
|
|
|
@ -8,15 +8,15 @@ GITREV=$(shell echo $(VER) | sed -rne 's,^[0-9]+\.[0-9]+.*\+[0-9]+\+g([0-f]{8})$
|
|||
GITCOUNT=$(shell echo $(VER) | sed -rne 's,^[0-9]+\.[0-9]+.*\+([0-9]+)\+g[0-f]{8}$$,\1,p')
|
||||
|
||||
%:
|
||||
dh $@ --with python2 --parallel
|
||||
dh $@ --with python3 --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="2.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python" -DGR_GIT_COUNT="$(GITCOUNT)" -DGR_GIT_HASH="$(GITREV)"
|
||||
dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="3.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python3" -DGR_GIT_COUNT="$(GITCOUNT)" -DGR_GIT_HASH="$(GITREV)"
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
rm -f debian/gr-osmosdr/usr/lib/python2.7/dist-packages/satnogs/*pyc
|
||||
rm -f debian/gr-osmosdr/usr/lib/python2.7/dist-packages/satnogs/*pyo
|
||||
rm -f debian/gr-satnogs/usr/lib/python3.7/dist-packages/satnogs/*pyc
|
||||
rm -f debian/gr-satnogs/usr/lib/python3.7/dist-packages/satnogs/*pyo
|
||||
|
||||
version-to-get:
|
||||
echo $(VER) is $(GITREV)
|
||||
|
|
|
@ -81,13 +81,11 @@ add_library(gnuradio-satnogs SHARED ${satnogs_sources})
|
|||
add_dependencies(gnuradio-satnogs fec)
|
||||
|
||||
target_link_libraries(gnuradio-satnogs PUBLIC
|
||||
${Boost_LIBRARIES}
|
||||
Boost::chrono
|
||||
gnuradio::gnuradio-runtime
|
||||
gnuradio::gnuradio-fft
|
||||
gnuradio::gnuradio-blocks
|
||||
gnuradio::gnuradio-digital
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
gnuradio::gnuradio-pmt
|
||||
${VOLK_LIBRARIES}
|
||||
${OGGVORBIS_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
/*
|
||||
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||
*
|
||||
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
||||
* Copyright (C) 2016, 2019
|
||||
* Libre Space Foundation <http://libre.space>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +25,9 @@
|
|||
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "debug_msg_source_impl.h"
|
||||
#include <boost/chrono.hpp>
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
namespace gr {
|
||||
namespace satnogs {
|
||||
|
@ -62,14 +65,12 @@ debug_msg_source_impl::msg_sender()
|
|||
pmt::pmt_t msg = pmt::make_blob(d_buf, d_buf_len);
|
||||
if (d_repeat) {
|
||||
while (d_running) {
|
||||
boost::this_thread::sleep_for(
|
||||
boost::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
message_port_pub(pmt::mp("msg"), msg);
|
||||
}
|
||||
}
|
||||
else {
|
||||
boost::this_thread::sleep_for(
|
||||
boost::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
message_port_pub(pmt::mp("msg"), msg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
/*
|
||||
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||
*
|
||||
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
||||
* Copyright (C) 2016, 2019
|
||||
* Libre Space Foundation <http://libre.space>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -25,6 +26,9 @@
|
|||
#include <gnuradio/io_signature.h>
|
||||
#include "debug_msg_source_raw_impl.h"
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
namespace gr {
|
||||
namespace satnogs {
|
||||
|
||||
|
@ -62,14 +66,12 @@ debug_msg_source_raw_impl::msg_sender()
|
|||
pmt::pmt_t msg = pmt::make_blob(d_buf, d_buf_len);
|
||||
if (d_repeat) {
|
||||
while (d_running) {
|
||||
boost::this_thread::sleep_for(
|
||||
boost::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
message_port_pub(pmt::mp("msg"), msg);
|
||||
}
|
||||
}
|
||||
else {
|
||||
boost::this_thread::sleep_for(
|
||||
boost::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3)));
|
||||
message_port_pub(pmt::mp("msg"), msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue