From 51e9cc2895caf46b496a039f4f7cf72fac9e510a Mon Sep 17 00:00:00 2001 From: Eric Milkie Date: Tue, 3 Apr 2012 10:59:12 -0400 Subject: [PATCH] cleanup pch; move some macros to SConstruct --- SConstruct | 19 ++++++++----------- src/mongo/pch.h | 14 -------------- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/SConstruct b/SConstruct index cb25b640e8312..e4a7d0d576d87 100644 --- a/SConstruct +++ b/SConstruct @@ -341,7 +341,11 @@ if has_option( "libpath" ): if has_option( "cpppath" ): env["CPPPATH"] = [get_option( "cpppath" )] -env.Prepend( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" ], +env.Prepend( CPPDEFINES=[ "_SCONS" , + "MONGO_EXPOSE_MACROS" , + "SUPPORT_UTF8" ], # for pcre + + CPPPATH=[ '$BUILD_DIR', "$BUILD_DIR/mongo" ] ) if has_option( "safeshell" ): @@ -534,8 +538,6 @@ elif "win32" == os.sys.platform: env.Append( EXTRACPPPATH=[ winSDKHome + "/Include" ] ) - # consider adding /MP build with multiple processes option. - # /EHsc exception handling style for visual studio # /W3 warning level # /WX abort build on compiler warnings @@ -603,7 +605,6 @@ elif "win32" == os.sys.platform: env.Append( EXTRALIBPATH=[ winSDKHome + "/Lib" ] ) if release: - #env.Append( LINKFLAGS=" /NODEFAULTLIB:MSVCPRT /NODEFAULTLIB:MSVCRTD " ) env.Append( LINKFLAGS=" /NODEFAULTLIB:MSVCPRT " ) else: env.Append( LINKFLAGS=" /NODEFAULTLIB:MSVCPRT /NODEFAULTLIB:MSVCRT " ) @@ -613,7 +614,6 @@ elif "win32" == os.sys.platform: if force64: winLibString += "" - #winLibString += " LIBCMT LIBCPMT " else: winLibString += " user32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib " @@ -625,12 +625,6 @@ elif "win32" == os.sys.platform: env.Append( LIBS=Split(winLibString) ) - # dm these should automatically be defined by the compiler. commenting out to see if works. jun2010 - #if force64: - # env.Append( CPPDEFINES=["_AMD64_=1"] ) - #else: - # env.Append( CPPDEFINES=["_X86_=1"] ) - env.Append( EXTRACPPPATH=["#/../winpcap/Include"] ) env.Append( EXTRALIBPATH=["#/../winpcap/Lib"] ) @@ -716,6 +710,9 @@ if usev8: env.Prepend( EXTRACPPPATH=["#/../v8/include/"] ) env.Prepend( EXTRALIBPATH=["#/../v8/"] ) +if usesm: + env.Append( CPPDEFINES=["JS_C_STRINGS_ARE_UTF8"] ) + if "uname" in dir(os): hacks = buildscripts.findHacks( os.uname() ) if hacks is not None: diff --git a/src/mongo/pch.h b/src/mongo/pch.h index 840559498c9f6..ec0d683332eca 100644 --- a/src/mongo/pch.h +++ b/src/mongo/pch.h @@ -21,20 +21,6 @@ #ifndef MONGO_PCH_H #define MONGO_PCH_H -// MONGO_EXPOSE_MACROS is defined for internal mongo programs. -// C++ driver consumers do not define this. -#if defined(MONGO_EXPOSE_MACROS) - -# define JS_C_STRINGS_ARE_UTF8 -# undef SUPPORT_UCP -# define SUPPORT_UCP -# undef SUPPORT_UTF8 -# define SUPPORT_UTF8 -# undef _CRT_SECURE_NO_WARNINGS -# define _CRT_SECURE_NO_WARNINGS - -#endif - // our #define macros must not be active when we include // system headers and boost headers #include "mongo/client/undef_macros.h"