mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-13724 Add --disable-warnings-as-errors scons option
This change was prompted by attempts to build 2.6.0 in SLES 10 with its system gcc version 4.1.2. It builds fine other than a sole warning - src/third_party/boost/boost/thread/detail/thread.hpp:316: warning: type attributes are honored only at type definition. It should also help in cases where compilers are too new.
This commit is contained in:
parent
d202cb9343
commit
27c128d303
@ -304,6 +304,8 @@ add_option("mongod-concurrency-level", "Concurrency level, \"global\" or \"db\""
|
||||
|
||||
add_option('build-fast-and-loose', "NEVER for production builds", 0, False)
|
||||
|
||||
add_option('disable-warnings-as-errors', "Don't add -Werror to compiler command line", 0, False)
|
||||
|
||||
add_option('propagate-shell-environment',
|
||||
"Pass shell environment to sub-processes (NEVER for production builds)",
|
||||
0, False)
|
||||
@ -772,7 +774,9 @@ if nix:
|
||||
"-Winvalid-pch"] )
|
||||
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet
|
||||
if linux or darwin:
|
||||
env.Append( CCFLAGS=["-Werror", "-pipe"] )
|
||||
env.Append( CCFLAGS=["-pipe"] )
|
||||
if not has_option("disable-warnings-as-errors"):
|
||||
env.Append( CCFLAGS=["-Werror"] )
|
||||
|
||||
env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
|
||||
env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
|
||||
|
Loading…
Reference in New Issue
Block a user