build+docs: align minimum requirements with ndn-cxx/NFD

* Recommend boost >= 1.65.1 and gcc >= 7.4.0
 * Require clang >= 4.0, or Xcode >= 9.0 on macOS
 * Silence an ABI-related diagnostic message from gcc on armv7
 * Update waf to version 2.0.21
 * Make graphviz optional for building documentation
 * Sync sphinx configuration

Change-Id: Ib271da841cd12e7595ae83d75bd0fc681f8c231f
This commit is contained in:
Davide Pesavento committed 2021-10-13 21:57:36 -04:00
1 parent 6f0f35d96d
commit 7ae8b08fc2
13 files changed
+90 -422

No files matched your search

+14 -6
View File
@@ -30,15 +30,16 @@ GIT_TAG_PREFIX = "NLSR-"
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs'])
opt.load(['default-compiler-flags', 'coverage', 'sanitizers',
'boost', 'doxygen', 'sphinx_build'],
opt.load(['default-compiler-flags',
'coverage', 'sanitizers', 'boost',
'doxygen', 'sphinx_build'],
tooldir=['.waf-tools'])
optgrp = opt.add_option_group('NLSR Options')
optgrp.add_option('--with-tests', action='store_true', default=False,
help='Build unit tests')
optgrp.add_option('--with-chronosync', action='store_true', default=False,
help='Build with Chronosync support')
help='Build with ChronoSync support')
def configure(conf):
conf.load(['compiler_cxx', 'gnu_dirs',
@@ -47,6 +48,8 @@ def configure(conf):
conf.env.WITH_TESTS = conf.options.with_tests
conf.find_program('dot', var='DOT', mandatory=False)
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', '%s/pkgconfig' % conf.env.LIBDIR)
conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDN_CXX',
pkg_config_path=pkg_config_path)
@@ -57,9 +60,13 @@ def configure(conf):
conf.check_boost(lib=boost_libs, mt=True)
if conf.env.BOOST_VERSION_NUMBER < 105800:
conf.fatal('Minimum required Boost version is 1.58.0\n'
'Please upgrade your distribution or manually install a newer version of Boost'
' (https://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)')
conf.fatal('The minimum supported version of Boost is 1.65.1.\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')
elif conf.env.BOOST_VERSION_NUMBER < 106501:
Logs.warn('WARNING: Using a version of Boost older than 1.65.1 is not officially supported and may not work.\n'
'If you encounter any problems, 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.options.with_chronosync:
conf.check_cfg(package='ChronoSync', args=['--cflags', '--libs'],
@@ -156,6 +163,7 @@ def doxygen(bld):
target=['docs/doxygen.conf',
'docs/named_data_theme/named_data_footer-with-analytics.html'],
VERSION=VERSION,
HAVE_DOT='YES' if bld.env.DOT else 'NO',
HTML_FOOTER='../build/docs/named_data_theme/named_data_footer-with-analytics.html' \
if os.getenv('GOOGLE_ANALYTICS', None) \
else '../docs/named_data_theme/named_data_footer.html',