View | Details | Raw Unified | Return to bug 3030
Collapse All | Expand All

(-)i/wscript (+29 lines)
 Lines 241-246   def options(opt): Link Here 
241
    opt.add_option('--cxx-standard',
241
    opt.add_option('--cxx-standard',
242
                   help=('Compile NS-3 with the given C++ standard'),
242
                   help=('Compile NS-3 with the given C++ standard'),
243
                   type='string', default='-std=c++11', dest='cxx_standard')
243
                   type='string', default='-std=c++11', dest='cxx_standard')
244
    opt.add_option('--disable-modules',
245
                  help=('Explicitly disable modules (comma-separated) from the build.'),
246
                  type='string', default='', dest='disable_modules')
244
247
245
    # options provided in subdirectories
248
    # options provided in subdirectories
246
    opt.recurse('src')
249
    opt.recurse('src')
 Lines 507-512   def configure(conf): Link Here 
507
            conf.env['NS3_ENABLED_MODULES'] = _enabled_mods
510
            conf.env['NS3_ENABLED_MODULES'] = _enabled_mods
508
            conf.env['NS3_ENABLED_CONTRIBUTED_MODULES'] = _enabled_contrib_mods
511
            conf.env['NS3_ENABLED_CONTRIBUTED_MODULES'] = _enabled_contrib_mods
509
512
513
    to_remove = []
514
    not_removed = []
515
    if Options.options.disable_modules:
516
        for mod in Options.options.disable_modules.split(','):
517
            name = ''
518
            if mod.startswith('ns3-'):
519
                name = mod[4:]
520
            else:
521
                name = mod
522
                mod = 'ns3-' + mod
523
524
            if mod in conf.env['NS3_ENABLED_MODULES']:
525
                to_remove.append(name)
526
                conf.env['MODULES_NOT_BUILT'].append(name)
527
            elif mod in conf.env['NS3_ENABLED_CONTRIBUTED_MODULES']:
528
                to_remove.append(name)
529
                conf.env['MODULES_NOT_BUILT'].append(name)
530
            else:
531
                not_removed.append(name)
532
533
        if len(to_remove) > 0:
534
            conf.report_optional_feature("Modules Disabled", "Disable modules (" + ','.join(to_remove) + ")", True, None)
535
        if len(not_removed) > 0:
536
            conf.report_optional_feature("Modules Not Disabled", "Disable modules error (" + ','.join(not_removed) + ")",
537
                                         False, "Module(s) not found in the list. Spelling error?")
538
510
    # Add the template module to the list of enabled modules that
539
    # Add the template module to the list of enabled modules that
511
    # should not be built if this is a static build on Darwin.  They
540
    # should not be built if this is a static build on Darwin.  They
512
    # don't work there for the template module, and this is probably
541
    # don't work there for the template module, and this is probably

Return to bug 3030