# HG changeset patch # User Ryan Mast # Date 1544146996 28800 # Node ID cce751c7e67878f03c012a351b73b30a09cb1e04 # Parent b6be8762cc1843fa9abead21ad7948aa9e9b628d build: (fixes #3007) Boost library configuration in contrib diff -r b6be8762cc18 -r cce751c7e678 contrib/wscript --- a/contrib/wscript Thu Dec 06 22:35:26 2018 +0100 +++ b/contrib/wscript Thu Dec 06 17:43:16 2018 -0800 @@ -26,6 +26,10 @@ all_contrib_modules.append(dirname) all_contrib_modules.sort() +def get_required_boost_libs(conf): + for module in all_contrib_modules: + conf.recurse (module, name="required_boost_libs", mandatory=False) + def options(opt): for module in all_contrib_modules: opt.recurse(module, mandatory=False) diff -r b6be8762cc18 -r cce751c7e678 src/wscript --- a/src/wscript Thu Dec 06 22:35:26 2018 +0100 +++ b/src/wscript Thu Dec 06 17:43:16 2018 -0800 @@ -29,7 +29,9 @@ all_modules.append(dirname) all_modules.sort() - +def get_required_boost_libs(conf): + for module in all_modules: + conf.recurse (module, name="required_boost_libs", mandatory=False) def options(opt): opt.add_option('--enable-rpath', @@ -49,18 +51,6 @@ opt.recurse(module, mandatory=False) def configure(conf): - conf.env['REQUIRED_BOOST_LIBS'] = [] - for module in all_modules: - conf.recurse (module, name="required_boost_libs", mandatory=False) - - if conf.env['REQUIRED_BOOST_LIBS'] is not []: - conf.load('boost') - conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), mandatory=False) - if not conf.env['LIB_BOOST']: - conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), libpath="/usr/lib64", mandatory=False) - if not conf.env['LIB_BOOST']: - conf.env['LIB_BOOST'] = [] - # Append blddir to the module path before recursing into modules blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant)) conf.env.append_value('NS3_MODULE_PATH', blddir + "/lib") diff -r b6be8762cc18 -r cce751c7e678 wscript --- a/wscript Thu Dec 06 22:35:26 2018 +0100 +++ b/wscript Thu Dec 06 17:43:16 2018 -0800 @@ -457,6 +457,19 @@ else: Logs.warn("CXX Standard flag " + Options.options.cxx_standard + " was not recognized, using compiler's default") + # Find Boost libraries by modules + conf.env['REQUIRED_BOOST_LIBS'] = [] + for modules_dir in ['src', 'contrib']: + conf.recurse (modules_dir, name="get_required_boost_libs", mandatory=False) + + if conf.env['REQUIRED_BOOST_LIBS'] is not []: + conf.load('boost') + conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), mandatory=False) + if not conf.env['LIB_BOOST']: + conf.check_boost(lib=' '.join (conf.env['REQUIRED_BOOST_LIBS']), libpath="/usr/lib64", mandatory=False) + if not conf.env['LIB_BOOST']: + conf.env['LIB_BOOST'] = [] + # Set this so that the lists won't be printed at the end of this # configure command. conf.env['PRINT_BUILT_MODULES_AT_END'] = False