refactor: cleanup and sync
* Fix Jenkins scripts and sync with ndn-cxx
* Sync waf-tools
* Remove ChronoSync submodule
* Remove commented/dead code and includes
* Use ScopedEventId and ScopedRegisteredPrefixHandle
* Set setCanBePrefix to true explicitly everywhere
* Fix macOS build, add GHA CI
* Use NDN_THROW for throwing errors
* Other smaller fixes
Change-Id: I615e0e239511b97101852e1d7c620a2071a18ff8
diff --git a/wscript b/wscript
index e65a6ba..ca889e9 100644
--- a/wscript
+++ b/wscript
@@ -7,34 +7,26 @@
def options(opt):
- opt.load(['compiler_c', 'compiler_cxx', 'qt5', 'gnu_dirs'])
+ opt.load(['compiler_c', 'compiler_cxx', 'gnu_dirs'])
- opt.load(['default-compiler-flags', 'boost', 'protoc',
- 'doxygen', 'sphinx_build', 'qt5', 'cryptopp'],
- tooldir=['waf-tools'])
+ opt.load(['default-compiler-flags', 'boost',
+ 'doxygen', 'sphinx_build', 'qt5_custom', 'cryptopp'],
+ tooldir=['.waf-tools'])
- opt = opt.add_option_group('ChronotChat Options')
+ opt = opt.add_option_group('ChronoChat Options')
opt.add_option('--with-tests', action='store_true', default=False, dest='with_tests',
help='''build unit tests''')
- opt.add_option('--with-log4cxx', action='store_true', default=False, dest='log4cxx',
- help='''Enable log4cxx''')
-
def configure(conf):
- conf.load(['compiler_c', 'compiler_cxx', 'qt5',
- 'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs',
+ conf.load(['compiler_c', 'compiler_cxx', 'qt5_custom',
+ 'default-compiler-flags', 'boost', 'gnu_dirs',
'doxygen', 'sphinx_build', 'cryptopp'])
conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
uselib_store='NDN_CXX', mandatory=True)
- if conf.options.log4cxx:
- conf.check_cfg(package='liblog4cxx', args=['--cflags', '--libs'],
- uselib_store='LOG4CXX', mandatory=True)
- conf.define("HAVE_LOG4CXX", 1)
-
- conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.1', '--cflags', '--libs'],
+ conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.5', '--cflags', '--libs'],
uselib_store='SYNC', mandatory=True)
boost_libs = 'system random thread filesystem'
@@ -43,14 +35,18 @@
conf.define('WITH_TESTS', 1);
boost_libs += ' unit_test_framework'
- conf.check_boost(lib=boost_libs)
- if conf.env.BOOST_VERSION_NUMBER < 104800:
- Logs.error("Minimum required boost version is 1.48.0")
- Logs.error("Please upgrade your distribution or install custom boost libraries" +
- " (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
- return
+ conf.check_boost(lib=boost_libs, mt=True)
+ if conf.env.BOOST_VERSION_NUMBER < 105800:
+ 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')
conf.check_cryptopp()
+ conf.check_compiler_flags()
conf.write_config_header('src/config.h')
def build (bld):
@@ -64,9 +60,9 @@
target = "ChronoChat",
features = feature_list,
defines = "WAF=1",
- source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc', 'logging.cc', 'src/*.proto']),
+ source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc']),
includes = "src .",
- use = "QT5CORE QT5GUI QT5WIDGETS QT5SQL NDN_CXX BOOST LOG4CXX SYNC CRYPTOPP",
+ use = "QT5CORE QT5GUI QT5WIDGETS QT5SQL NDN_CXX BOOST SYNC CRYPTOPP",
)
# Unit tests
@@ -81,10 +77,10 @@
)
# Debug tools
- if bld.env["_DEBUG"]:
- for app in bld.path.ant_glob('debug-tools/*.cc'):
+ if "_DEBUG" in bld.env["DEFINES"]:
+ for app in bld.path.ant_glob('debug-tools/*.cpp'):
bld(features=['cxx', 'cxxprogram'],
- target = '%s' % (str(app.change_ext('','.cc'))),
+ target = '%s' % (str(app.change_ext('','.cpp'))),
source = app,
use = 'NDN_CXX',
includes = "src .",