|
|
| 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. |
|
|
| 391 |
env['APPNAME'] = wutils.APPNAME |
390 |
env['APPNAME'] = wutils.APPNAME |
| 392 |
env['VERSION'] = wutils.VERSION |
391 |
env['VERSION'] = wutils.VERSION |
| 393 |
|
392 |
|
|
|
393 |
if conf.env['CXX_NAME'] in ['gcc']: |
| 394 |
if tuple(map(int, conf.env['CC_VERSION'])) < gcc_min_version: |
| 395 |
conf.fatal('gcc version %s older than minimum supported version %s' % |
| 396 |
('.'.join(conf.env['CC_VERSION']), '.'.join(map(str, gcc_min_version)))) |
| 397 |
|
| 394 |
if conf.env['CXX_NAME'] in ['gcc', 'icc']: |
398 |
if conf.env['CXX_NAME'] in ['gcc', 'icc']: |
| 395 |
if Options.options.build_profile == 'release': |
399 |
if Options.options.build_profile == 'release': |
| 396 |
env.append_value('CXXFLAGS', '-fomit-frame-pointer') |
400 |
env.append_value('CXXFLAGS', '-fomit-frame-pointer') |
|
|
| 398 |
if conf.check_compilation_flag('-march=native'): |
402 |
if conf.check_compilation_flag('-march=native'): |
| 399 |
env.append_value('CXXFLAGS', '-march=native') |
403 |
env.append_value('CXXFLAGS', '-march=native') |
| 400 |
env.append_value('CXXFLAGS', '-fstrict-overflow') |
404 |
env.append_value('CXXFLAGS', '-fstrict-overflow') |
| 401 |
if conf.env['CC_VERSION'] >= gcc_version_warn_strict_overflow: |
405 |
if conf.env['CXX_NAME'] in ['gcc']: |
| 402 |
env.append_value('CXXFLAGS', '-Wstrict-overflow=2') |
406 |
env.append_value('CXXFLAGS', '-Wstrict-overflow=2') |
| 403 |
|
407 |
|
| 404 |
if sys.platform == 'win32': |
408 |
if sys.platform == 'win32': |