summaryrefslogtreecommitdiff
path: root/src/mongo/pch.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-01-20 16:33:42 -0500
committerEric Milkie <milkie@10gen.com>2012-01-20 16:35:56 -0500
commit30163a270db97c479a843a8c3e8ac1b644ad759f (patch)
tree4a89620dc0a87567d17c0aebe56b3cba5229c83c /src/mongo/pch.h
parent93c545704be4e817f42d919bd33d476849f6d843 (diff)
downloadmongo-30163a270db97c479a843a8c3e8ac1b644ad759f.tar.gz
turn on boost asserts for all compilation
The legacy linux build has been failing in release mode because disabling boost asserts results in an unused variable which triggers a warning, and we have warnings-as-errors turned on in that build. To avoid the warning, and to improve code in general, I have turned on boost asserts for all compilation. This means if you hit a boost assert, it will call mongo::log() with the message. In debug mode, the program will subsequently abort.
Diffstat (limited to 'src/mongo/pch.h')
-rw-r--r--src/mongo/pch.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/pch.h b/src/mongo/pch.h
index ace83b20b87..9e5be0fbcf9 100644
--- a/src/mongo/pch.h
+++ b/src/mongo/pch.h
@@ -22,11 +22,9 @@
#define MONGO_PCH_H
#if defined(MONGO_EXPOSE_MACROS)
-# if defined(_DEBUG)
-# define BOOST_ENABLE_ASSERT_HANDLER 1
-# else
-# define BOOST_DISABLE_ASSERTS 1
-# endif
+// this is defined in server.h for non-MONGO_EXPOSE_MACROS
+# define BOOST_ENABLE_ASSERT_HANDLER 1
+
# define JS_C_STRINGS_ARE_UTF8
# undef SUPPORT_UCP
# define SUPPORT_UCP