build: (fixes #3007) Boost library configuration in contrib
This commit is contained in:
@@ -26,6 +26,10 @@ for dirname in os.listdir('contrib'):
|
||||
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)
|
||||
|
||||
16
src/wscript
16
src/wscript
@@ -29,7 +29,9 @@ for dirname in os.listdir('src'):
|
||||
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 @@ def options(opt):
|
||||
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")
|
||||
|
||||
13
wscript
13
wscript
@@ -457,6 +457,19 @@ def configure(conf):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user