Hi,
Please add --cc, --cxx and --clang to SConstruct.
Like the example I have below.
Thanks,
Waitman Gobble
San Jose, California USA
# diff -c SConstruct ../bu-mongo-cxx-driver-nightly/SConstruct
*** SConstruct Fri Apr 13 02:21:05 2012
--- ../bu-mongo-cxx-driver-nightly/SConstruct Sat May 19 00:21:31 2012
***************
*** 13,18 ****
--- 13,24 ----
action="store",
help="comma separated list of add'l paths (--extrapath /opt/foo/,/foo) static linking")
+ AddOption( "--cxx", dest="cxx", type="string", nargs=1, action="store", default="g++",help="use an alternate C++ compiler" )
+
+ AddOption( "--cc", dest="cc", type="string", nargs=1, action="store", default="gcc",help="use an alternate C Compiler" )
+
+ AddOption( "--clang", dest="clang", type="string", nargs=1, action="store", default="1", help="use the clang compiler for C and C++" )
+
AddOption("--prefix",
dest="prefix",
type="string",
***************
*** 30,35 ****
--- 36,42 ----
MSVS_ARCH=None,
PYTHON=sys.executable)
+
def addExtraLibs(s):
for x in s.split(","):
if os.path.exists(x):
***************
*** 39,44 ****
--- 46,61 ----
if GetOption( "extrapath" ) is not None:
addExtraLibs( GetOption( "extrapath" ) )
+ if GetOption( "cxx" ):
+ env["CXX"] = GetOption( "cxx" )
+
+ if GetOption( "cc" ):
+ env["CC"] = GetOption( "cc" )
+
+ if GetOption("clang"):
+ env["CC"] = 'clang'
+ env["CXX"] = 'clang++'
+
env.Prepend(CPPPATH=["$BUILD_DIR", "$BUILD_DIR/mongo"])
env.Append(CPPDEFINES=[ "_SCONS", "MONGO_EXPOSE_MACROS" ])