build: require boost >= 1.71.0

Refs: #5276
Change-Id: I287a52dab0212d1ce0da77afb563554214cac68a
This commit is contained in:
Davide Pesavento committed 2023-09-22 15:45:21 -04:00
1 parent 9330c2ee49
commit 1af7949d1b
8 files changed
+28 -22

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2012-2019 University of California, Los Angeles * Copyright (c) 2012-2023 University of California, Los Angeles
* *
* This file is part of ChronoSync, synchronization library for distributed realtime * This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN. * applications for NDN.
@@ -26,7 +26,7 @@
namespace chronosync { namespace chronosync {
InterestTable::InterestTable(boost::asio::io_service& io) InterestTable::InterestTable(boost::asio::io_context& io)
: m_scheduler(io) : m_scheduler(io)
{ {
} }
+4 -4
View File
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2012-2021 University of California, Los Angeles * Copyright (c) 2012-2023 University of California, Los Angeles
* *
* This file is part of ChronoSync, synchronization library for distributed realtime * This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN. * applications for NDN.
@@ -27,12 +27,12 @@
#include "interest-container.hpp" #include "interest-container.hpp"
#include <boost/asio/io_service.hpp> #include <boost/asio/io_context.hpp>
namespace chronosync { namespace chronosync {
/** /**
* @brief A table to keep unsatisfied Sync Interest * @brief A table to keep unsatisfied Sync Interests.
*/ */
class InterestTable : noncopyable class InterestTable : noncopyable
{ {
@@ -47,7 +47,7 @@ public:
using const_iterator = InterestContainer::const_iterator; using const_iterator = InterestContainer::const_iterator;
explicit explicit
InterestTable(boost::asio::io_service& io); InterestTable(boost::asio::io_context& io);
~InterestTable(); ~InterestTable();
+7 -6
View File
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2012-2022 University of California, Los Angeles * Copyright (c) 2012-2023 University of California, Los Angeles
* *
* This file is part of ChronoSync, synchronization library for distributed realtime * This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN. * applications for NDN.
@@ -22,7 +22,7 @@
#include <ndn-cxx/util/time-unit-test-clock.hpp> #include <ndn-cxx/util/time-unit-test-clock.hpp>
#include <boost/asio.hpp> #include <boost/asio/io_context.hpp>
namespace ndn::tests { namespace ndn::tests {
@@ -42,14 +42,15 @@ public:
} }
void void
advanceClocks(const time::nanoseconds& tick, size_t nTicks = 1) advanceClocks(time::nanoseconds tick, size_t nTicks = 1)
{ {
for (size_t i = 0; i < nTicks; ++i) { for (size_t i = 0; i < nTicks; ++i) {
steadyClock->advance(tick); steadyClock->advance(tick);
systemClock->advance(tick); systemClock->advance(tick);
if (io.stopped()) if (io.stopped()) {
io.reset(); io.restart();
}
io.poll(); io.poll();
} }
} }
@@ -57,7 +58,7 @@ public:
public: public:
shared_ptr<time::UnitTestSteadyClock> steadyClock; shared_ptr<time::UnitTestSteadyClock> steadyClock;
shared_ptr<time::UnitTestSystemClock> systemClock; shared_ptr<time::UnitTestSystemClock> systemClock;
boost::asio::io_service io; boost::asio::io_context io;
}; };
} // namespace ndn::tests } // namespace ndn::tests
+6 -5
View File
@@ -19,12 +19,13 @@
#include "dummy-forwarder.hpp" #include "dummy-forwarder.hpp"
#include <boost/asio/io_service.hpp> #include <boost/asio/io_context.hpp>
#include <boost/asio/post.hpp>
namespace ndn { namespace ndn {
namespace chronosync { namespace chronosync {
DummyForwarder::DummyForwarder(boost::asio::io_service& io, KeyChain& keyChain) DummyForwarder::DummyForwarder(boost::asio::io_context& io, KeyChain& keyChain)
: m_io(io) : m_io(io)
, m_keyChain(keyChain) , m_keyChain(keyChain)
{ {
@@ -42,7 +43,7 @@ DummyForwarder::addFace()
if (self == &*otherFace) { if (self == &*otherFace) {
continue; continue;
} }
m_io.post([=] { otherFace->receive(i); }); boost::asio::post(m_io, [=] { otherFace->receive(i); });
} }
}); });
@@ -52,7 +53,7 @@ DummyForwarder::addFace()
if (self == &*otherFace) { if (self == &*otherFace) {
continue; continue;
} }
m_io.post([=] { otherFace->receive(d); }); boost::asio::post(m_io, [=] { otherFace->receive(d); });
} }
}); });
@@ -62,7 +63,7 @@ DummyForwarder::addFace()
if (self == &*otherFace) { if (self == &*otherFace) {
continue; continue;
} }
m_io.post([=] { otherFace->receive(n); }); boost::asio::post(m_io, [=] { otherFace->receive(n); });
} }
}); });
+2 -2
View File
@@ -38,7 +38,7 @@ namespace chronosync {
class DummyForwarder class DummyForwarder
{ {
public: public:
DummyForwarder(boost::asio::io_service& io, KeyChain& keyChain); DummyForwarder(boost::asio::io_context& io, KeyChain& keyChain);
Face& Face&
addFace(); addFace();
@@ -53,7 +53,7 @@ public:
removeFaces(); removeFaces();
private: private:
boost::asio::io_service& m_io; boost::asio::io_context& m_io;
KeyChain& m_keyChain; KeyChain& m_keyChain;
std::vector<std::shared_ptr<DummyClientFace>> m_faces; std::vector<std::shared_ptr<DummyClientFace>> m_faces;
}; };
+1 -1
View File
@@ -363,7 +363,7 @@ BOOST_AUTO_TEST_CASE(CancelOutstandingEvents)
systemClock->advance(ndn::time::hours(1)); systemClock->advance(ndn::time::hours(1));
BOOST_CHECK_EQUAL(io.poll(), 0); // no delayed handlers are expected BOOST_CHECK_EQUAL(io.poll(), 0); // no delayed handlers are expected
BOOST_CHECK_EQUAL(io.stopped(), true); // io_service expected to be stopped BOOST_CHECK_EQUAL(io.stopped(), true); // io_context expected to be stopped
} }
BOOST_FIXTURE_TEST_CASE(TrimState, ndn::tests::IdentityManagementTimeFixture) BOOST_FIXTURE_TEST_CASE(TrimState, ndn::tests::IdentityManagementTimeFixture)
+2 -2
View File
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2012-2022 University of California, Los Angeles * Copyright (c) 2012-2023 University of California, Los Angeles
* *
* This file is part of ChronoSync, synchronization library for distributed realtime * This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN. * applications for NDN.
@@ -72,7 +72,7 @@ public:
Name syncPrefix; Name syncPrefix;
Name userPrefix[3]; Name userPrefix[3];
boost::asio::io_service io; boost::asio::io_context io;
shared_ptr<ndn::Face> face; shared_ptr<ndn::Face> face;
ndn::Scheduler scheduler; ndn::Scheduler scheduler;
shared_ptr<Handler> handler; shared_ptr<Handler> handler;
+4
View File
@@ -38,6 +38,10 @@ def configure(conf):
uselib_store='NDN_CXX', pkg_config_path=pkg_config_path) uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)
conf.check_boost(lib='iostreams', mt=True) conf.check_boost(lib='iostreams', mt=True)
if conf.env.BOOST_VERSION_NUMBER < 107100:
conf.fatal('The minimum supported version of Boost is 1.71.0.\n'
'Please upgrade your distribution or manually install a newer version of Boost.\n'
'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
if conf.env.WITH_TESTS: if conf.env.WITH_TESTS:
conf.check_boost(lib='filesystem unit_test_framework', mt=True, uselib_store='BOOST_TESTS') conf.check_boost(lib='filesystem unit_test_framework', mt=True, uselib_store='BOOST_TESTS')