|
|
| 30 |
examples_enabled = False |
30 |
examples_enabled = False |
| 31 |
tests_enabled = False |
31 |
tests_enabled = False |
| 32 |
|
32 |
|
|
|
33 |
# GCC minimum version requirements for C++11 support |
| 34 |
gcc_min_version = ('4', '9', '2') |
| 35 |
|
| 33 |
# Compiler warning suppressions |
36 |
# Compiler warning suppressions |
| 34 |
|
37 |
|
| 35 |
# Bug 1868: be conservative about -Wstrict-overflow for optimized builds |
|
|
| 36 |
# on older compilers; it can generate spurious warnings. |
| 37 |
gcc_version_warn_strict_overflow = ('4', '8', '2') |
| 38 |
|
| 39 |
# Bug 2181: clang warnings about unused local typedefs and potentially |
38 |
# Bug 2181: clang warnings about unused local typedefs and potentially |
| 40 |
# evaluated expressions affecting darwin clang/LLVM version 7.0.0 (Xcode 7) |
39 |
# evaluated expressions affecting darwin clang/LLVM version 7.0.0 (Xcode 7) |
| 41 |
# or clang/LLVM version 3.6 or greater. We must make this platform-specific. |
40 |
# or clang/LLVM version 3.6 or greater. We must make this platform-specific. |
|
|
| 295 |
conf.end_msg(ok) |
294 |
conf.end_msg(ok) |
| 296 |
return ok |
295 |
return ok |
| 297 |
|
296 |
|
|
|
297 |
def check_gcc_min_version(cc_version, min_version): |
| 298 |
if int(cc_version[0]) < int(min_version[0]): |
| 299 |
return False |
| 300 |
elif int(cc_version[1]) < int(min_version[1]): |
| 301 |
return False |
| 302 |
elif int(cc_version[2]) < int(min_version[2]): |
| 303 |
return False |
| 304 |
else: |
| 305 |
return True |
| 298 |
|
306 |
|
| 299 |
def report_optional_feature(conf, name, caption, was_enabled, reason_not_enabled): |
307 |
def report_optional_feature(conf, name, caption, was_enabled, reason_not_enabled): |
| 300 |
conf.env.append_value('NS3_OPTIONAL_FEATURES', [(name, caption, was_enabled, reason_not_enabled)]) |
308 |
conf.env.append_value('NS3_OPTIONAL_FEATURES', [(name, caption, was_enabled, reason_not_enabled)]) |
|
|
| 391 |
env['APPNAME'] = wutils.APPNAME |
399 |
env['APPNAME'] = wutils.APPNAME |
| 392 |
env['VERSION'] = wutils.VERSION |
400 |
env['VERSION'] = wutils.VERSION |
| 393 |
|
401 |
|
|
|
402 |
if conf.env['CXX_NAME'] in ['gcc']: |
| 403 |
if not check_gcc_min_version(conf.env['CC_VERSION'], gcc_min_version): |
| 404 |
conf.fatal('gcc version %s less than minimum supported version %s' % |
| 405 |
('.'.join(conf.env['CC_VERSION']), '.'.join(gcc_min_version))) |
| 406 |
|
| 394 |
if conf.env['CXX_NAME'] in ['gcc', 'icc']: |
407 |
if conf.env['CXX_NAME'] in ['gcc', 'icc']: |
| 395 |
if Options.options.build_profile == 'release': |
408 |
if Options.options.build_profile == 'release': |
| 396 |
env.append_value('CXXFLAGS', '-fomit-frame-pointer') |
409 |
env.append_value('CXXFLAGS', '-fomit-frame-pointer') |
|
|
| 398 |
if conf.check_compilation_flag('-march=native'): |
411 |
if conf.check_compilation_flag('-march=native'): |
| 399 |
env.append_value('CXXFLAGS', '-march=native') |
412 |
env.append_value('CXXFLAGS', '-march=native') |
| 400 |
env.append_value('CXXFLAGS', '-fstrict-overflow') |
413 |
env.append_value('CXXFLAGS', '-fstrict-overflow') |
| 401 |
if conf.env['CC_VERSION'] >= gcc_version_warn_strict_overflow: |
414 |
if conf.env['CXX_NAME'] in ['gcc']: |
| 402 |
env.append_value('CXXFLAGS', '-Wstrict-overflow=2') |
415 |
env.append_value('CXXFLAGS', '-Wstrict-overflow=2') |
| 403 |
|
416 |
|
| 404 |
if sys.platform == 'win32': |
417 |
if sys.platform == 'win32': |