summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2014-04-29 17:34:05 -0400
committerMatt Kangas <matt.kangas@mongodb.com>2014-05-08 15:43:08 -0400
commit899d16e9c6ff8388db6c9c42bbaa97f330fa5bfc (patch)
treed41df7f9c770a929f4c64212afe29ea581742227
parentd218cd5a78936e46f945e7976bc26d25630a7792 (diff)
downloadmongo-899d16e9c6ff8388db6c9c42bbaa97f330fa5bfc.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. (cherry picked from commit 27c128d303d9d3bcdf471d4da69bd1b8940fd038) Conflicts: SConstruct
-rw-r--r--SConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 69a374693bc..ab01a7142a2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -231,6 +231,8 @@ add_option("mongod-concurrency-level", "Concurrency level, \"global\" or \"db\""
add_option('client-dist-basename', "Name of the client source archive.", 1, False,
default='mongo-cxx-driver')
+add_option('disable-warnings-as-errors', "Don't add -Werror to compiler command line", 0, False)
+
# don't run configure if user calls --help
if GetOption('help'):
Return()
@@ -710,7 +712,9 @@ if nix:
"-Winvalid-pch"] )
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet
if linux:
- env.Append( CCFLAGS=["-Werror", "-pipe"] )
+ env.Append( CCFLAGS=["-pipe"] )
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
if not has_option('clang'):
env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's