Adding boost logging support for NLSR
diff --git a/wscript b/wscript
index 79420c0..b82e73a 100644
--- a/wscript
+++ b/wscript
@@ -1,67 +1,50 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-VERSION='1.0.0'
-APPNAME='nlsr'
-
-from waflib import Configure, Build, Logs
+from waflib import Build, Logs, Utils, Task, TaskGen, Configure
def options(opt):
- opt.load('compiler_cxx boost')
+ opt.load('compiler_c compiler_cxx gnu_dirs c_osx')
+ opt.load('boost', tooldir=['.waf-tools'])
- syncopt = opt.add_option_group ("nlsr Options")
-
- syncopt.add_option('--debug',action='store_true',default=False,dest='debug',help='''debugging mode''')
+ opt = opt.add_option_group('Options')
+ opt.add_option('--debug',action='store_true',default=False,dest='debug',help='''debugging mode''')
def configure(conf):
- conf.load('compiler_cxx boost')
+ conf.load("compiler_cxx boost gnu_dirs")
if conf.options.debug:
conf.define ('_DEBUG', 1)
- conf.add_supported_cxxflags (cxxflags = ['-O0',
- '-Wall',
- '-Wno-unused-variable',
- '-g3',
- '-Wno-unused-private-field', # only clang supports
- '-fcolor-diagnostics', # only clang supports
- '-Qunused-arguments', # only clang supports
- '-Wno-tautological-compare', # suppress warnings from CryptoPP
- '-Wno-deprecated-declarations'
- ])
+ flags = ['-O0',
+ '-Wall',
+ # '-Werror',
+ '-Wno-unused-variable',
+ '-g3',
+ '-Wno-unused-private-field', # only clang supports
+ '-fcolor-diagnostics', # only clang supports
+ '-Qunused-arguments', # only clang supports
+ '-Wno-tautological-compare', # suppress warnings from CryptoPP
+ '-Wno-unused-function', # another annoying warning from CryptoPP
+
+ '-Wno-deprecated-declarations',
+ ]
+
+ conf.add_supported_cxxflags (cxxflags = flags)
else:
- conf.add_supported_cxxflags (cxxflags = ['-O3',
- '-g',
- '-Wno-unused-variable',
- '-Wno-tautological-compare',
- '-Wno-unused-function',
- '-Wno-deprecated-declarations'
- ])
+ flags = ['-O3', '-g', '-Wno-tautological-compare','-Wno-unused-variable',
+ '-Wno-unused-function', '-Wno-deprecated-declarations']
+ conf.add_supported_cxxflags (cxxflags = flags)
- conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'], uselib_store='NDNCPP', mandatory=True)
-
- conf.check_boost(lib='system iostreams thread unit_test_framework', mandatory=True)
-
- conf.check_cfg(package='ChronoSync', args=['--cflags', '--libs'], uselib_store='ChronoSync', mandatory=True)
-
-
+ conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'], uselib_store='NDN_CPP', mandatory=True)
+ conf.check_boost(lib='system iostreams thread unit_test_framework log', uselib_store='BOOST', version='1_55', mandatory=True)
def build (bld):
bld (
- # vnum = "1.0.0",
features=['cxx', 'cxxprogram'],
target="nlsr",
- source = bld.path.ant_glob('src/*.cpp'),
- use = 'BOOST NDNCPP ChronoSync',
- #cwd = bld.path.find_dir ("src"),
- includes = ['src'],
+ source = bld.path.ant_glob('*.cpp'),
+ use = 'NDN_CPP BOOST',
)
- #bld.install_files (
- # dest = "%s/nlsr" % bld.env['INCLUDEDIR'],
- # files = bld.path.ant_glob(['*.hpp']),
- # cwd = bld.path.find_dir ("src"),
- # relative_trick = True,
- # )
-
@Configure.conf
def add_supported_cxxflags(self, cxxflags):
"""
@@ -76,3 +59,4 @@
self.end_msg (' '.join (supportedFlags))
self.env.CXXFLAGS += supportedFlags
+