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

(-)a/wscript (-3 / +9 lines)
 Lines 241-246   def options(opt): Link Here 
241
                   help=('Log all events in a json file with the name of the executable (which must call CommandLine::Parse(argc, argv)'),
241
                   help=('Log all events in a json file with the name of the executable (which must call CommandLine::Parse(argc, argv)'),
242
                   action="store_true", default=False,
242
                   action="store_true", default=False,
243
                   dest='enable_desmetrics')
243
                   dest='enable_desmetrics')
244
    opt.add_option('--cxx-standard',
245
                   help=('Compile NS-3 with the given C++ standard'),
246
                   type='string', default='-std=c++11', dest='cxx_standard')
244
247
245
    # options provided in subdirectories
248
    # options provided in subdirectories
246
    opt.recurse('src')
249
    opt.recurse('src')
 Lines 445-452   def configure(conf): Link Here 
445
                conf.report_optional_feature("static", "Static build", False,
448
                conf.report_optional_feature("static", "Static build", False,
446
                                             "Link flag -Wl,--whole-archive,-Bstatic does not work")
449
                                             "Link flag -Wl,--whole-archive,-Bstatic does not work")
447
450
448
    # Enable C++-11 support
451
    # Enables C++-11 support by default, unless user specified another option
449
    env.append_value('CXXFLAGS', '-std=c++11')
452
    # Warn the user if the CXX Standard flag provided was not recognized  
453
    if conf.check_compilation_flag(Options.options.cxx_standard):
454
        env.append_value('CXXFLAGS', Options.options.cxx_standard)
455
    else:
456
        Logs.warn("CXX Standard flag " + Options.options.cxx_standard + " was not recognized, using compiler's default")
450
457
451
    # Set this so that the lists won't be printed at the end of this
458
    # Set this so that the lists won't be printed at the end of this
452
    # configure command.
459
    # configure command.
453
- 

Return to bug 2800