summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2014-04-29 17:34:05 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2014-05-01 17:27:36 -0400
commit27c128d303d9d3bcdf471d4da69bd1b8940fd038 (patch)
treedd8fc55c30f0c70a132f72d50d917d3f38648a95 /SConstruct
parentd202cb934339c297f1c096e62c6adbae14bcbf89 (diff)
downloadmongo-27c128d303d9d3bcdf471d4da69bd1b8940fd038.tar.gz
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.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index b1d739cc916..0907e26f2ad 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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"] )