build: require boost >= 1.71.0
Refs: #5276 Change-Id: Ib62b24b041e21b2c017cd9c290f7d5dc09003d63
This commit is contained in:
1 parent
b6e10dd86a
commit
2ab04a2b9f
9 files changed
+32
-30
No files matched your search
+1
-1
@@ -119,5 +119,5 @@ main(int argc, char* argv[])
|
||||
|
||||
### Command Line Arguments
|
||||
|
||||
[Boost.Program\_options](https://www.boost.org/doc/libs/1_65_1/doc/html/program_options.html)
|
||||
[Boost.Program\_options](https://www.boost.org/doc/libs/1_71_0/doc/html/program_options.html)
|
||||
is strongly preferred over `getopt(3)` for parsing command line arguments.
|
||||
+7
-3
@@ -8,15 +8,19 @@ except the object that contains the `main()` function.
|
||||
|
||||
For example:
|
||||
|
||||
bld(features='cxx',
|
||||
name='tool-subtool-objects',
|
||||
```python
|
||||
def build(bld):
|
||||
bld.objects(
|
||||
target='tool-subtool-objects',
|
||||
source=bld.path.ant_glob('subtool/*.cpp', excl='subtool/main.cpp'),
|
||||
use='core-objects')
|
||||
|
||||
bld(features='cxx cxxprogram',
|
||||
bld.program(
|
||||
name='subtool',
|
||||
target='../../bin/subtool',
|
||||
source='subtool/main.cpp',
|
||||
use='tool-subtool-objects')
|
||||
|
||||
bld(name='tool-objects',
|
||||
use='tool-subtool-objects')
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2022, Regents of the University of California,
|
||||
* Copyright (c) 2014-2023, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "tests/clock-fixture.hpp"
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
namespace ndn::tests {
|
||||
|
||||
@@ -39,17 +39,13 @@ private:
|
||||
afterTick() final
|
||||
{
|
||||
if (m_io.stopped()) {
|
||||
#if BOOST_VERSION >= 106600
|
||||
m_io.restart();
|
||||
#else
|
||||
m_io.reset();
|
||||
#endif
|
||||
}
|
||||
m_io.poll();
|
||||
}
|
||||
|
||||
protected:
|
||||
boost::asio::io_service m_io;
|
||||
boost::asio::io_context m_io;
|
||||
};
|
||||
|
||||
} // namespace ndn::tests
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/test/tools/output_test_stream.hpp>
|
||||
|
||||
namespace ndn::peek::tests {
|
||||
@@ -129,7 +128,7 @@ public:
|
||||
BOOST_AUTO_TEST_SUITE(Peek)
|
||||
BOOST_FIXTURE_TEST_SUITE(TestNdnPeek, NdnPeekFixture)
|
||||
|
||||
using OutputChecks = boost::mpl::vector<OutputFull, OutputPayloadOnly>;
|
||||
using OutputChecks = std::tuple<OutputFull, OutputPayloadOnly>;
|
||||
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE(Default, OutputCheck, OutputChecks)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "tests/key-chain-fixture.hpp"
|
||||
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
|
||||
namespace ndn::ping::tests {
|
||||
|
||||
@@ -53,7 +54,7 @@ protected:
|
||||
void
|
||||
receive(DummyClientFace& face, const Packet& pkt)
|
||||
{
|
||||
m_io.post([=, &face] {
|
||||
boost::asio::post(m_io, [=, &face] {
|
||||
if (!wantLoss) {
|
||||
face.receive(pkt);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(Test1)
|
||||
int i = 0;
|
||||
|
||||
// For reference of available Boost.Test macros, see
|
||||
// https://www.boost.org/doc/libs/1_65_1/libs/test/doc/html/boost_test/testing_tools/summary.html
|
||||
// https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/testing_tools/summary.html
|
||||
|
||||
BOOST_REQUIRE_NO_THROW(i = 1);
|
||||
BOOST_CHECK_EQUAL(i, 1);
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ def build(bld):
|
||||
target=f'{top}/unit-tests',
|
||||
name='unit-tests',
|
||||
source=bld.path.ant_glob(['*.cpp'] + [f'{tool}/**/*.cpp' for tool in bld.env.BUILD_TOOLS]),
|
||||
use=['core-objects'] + [f'{tool}-objects' for tool in bld.env.BUILD_TOOLS],
|
||||
use=['BOOST_TESTS', 'core-objects'] + [f'{tool}-objects' for tool in bld.env.BUILD_TOOLS],
|
||||
install_path=None)
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2016-2022, Regents of the University of California,
|
||||
* Copyright (c) 2016-2023, Regents of the University of California,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University.
|
||||
*
|
||||
@@ -31,7 +31,8 @@
|
||||
#include "pipeline-interests.hpp"
|
||||
#include "data-fetcher.hpp"
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
|
||||
namespace ndn::chunks {
|
||||
|
||||
@@ -101,8 +102,9 @@ PipelineInterests::onFailure(const std::string& reason)
|
||||
|
||||
cancel();
|
||||
|
||||
if (m_onFailure)
|
||||
m_face.getIoService().post([this, reason] { m_onFailure(reason); });
|
||||
if (m_onFailure) {
|
||||
boost::asio::post(m_face.getIoService(), [this, reason] { m_onFailure(reason); });
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -37,17 +37,15 @@ def configure(conf):
|
||||
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.1', '--cflags', '--libs'],
|
||||
uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)
|
||||
|
||||
boost_libs = ['system', 'program_options']
|
||||
if conf.env.WITH_TESTS:
|
||||
boost_libs.append('unit_test_framework')
|
||||
conf.define('WITH_TESTS', 1)
|
||||
|
||||
conf.check_boost(lib=boost_libs, mt=True)
|
||||
if conf.env.BOOST_VERSION_NUMBER < 106501:
|
||||
conf.fatal('The minimum supported version of Boost is 1.65.1.\n'
|
||||
conf.check_boost(lib='program_options', 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:
|
||||
conf.check_boost(lib='unit_test_framework', mt=True, uselib_store='BOOST_TESTS')
|
||||
|
||||
conf.recurse('tools')
|
||||
|
||||
conf.check_compiler_flags()
|
||||
@@ -56,6 +54,8 @@ def configure(conf):
|
||||
conf.load('coverage')
|
||||
conf.load('sanitizers')
|
||||
|
||||
conf.define_cond('WITH_TESTS', conf.env.WITH_TESTS)
|
||||
|
||||
conf.msg('Tools to build', ', '.join(conf.env.BUILD_TOOLS))
|
||||
|
||||
def build(bld):
|
||||
@@ -69,8 +69,8 @@ def build(bld):
|
||||
|
||||
bld.objects(
|
||||
target='core-objects',
|
||||
source=bld.path.find_node('core').ant_glob('*.cpp') + ['core/version.cpp'],
|
||||
use='NDN_CXX BOOST',
|
||||
source=bld.path.find_dir('core').ant_glob('*.cpp') + ['core/version.cpp'],
|
||||
use='BOOST NDN_CXX',
|
||||
includes='.',
|
||||
export_includes='.')
|
||||
|
||||
|
||||
Reference in new issue
Block a user