0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

attempt at using checkLib for client SConstruct

This commit is contained in:
Mike Dirolf 2010-07-28 12:35:57 -04:00
parent 8d6a597d62
commit 6656bcd61d

View File

@ -40,7 +40,10 @@ if linux:
env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
boostLibs = [ "thread" , "filesystem" , "system" ]
env.Prepend( LIBS =["boost_%s-mt"%(lib) for lib in boostLibs ] )
conf = Configure(env)
for lib in boostLibs:
if not conf.CheckLib("boost_%s-mt" % lib):
conf.CheckLib("boost_%s" % lib)
allClientFiles = []
allClientFiles += Glob( "mongo/*.cpp" )
allClientFiles += Glob( "mongo/client/*.cpp" )
@ -56,12 +59,8 @@ env.SharedLibrary( "mongoclient" , allClientFiles )
clientTests = []
clientEnv = env.Clone();
#clientEnv.Append( CPPPATH=["../"] )
clientEnv.Prepend( LIBS=[ "mongoclient"]+["boost_%s-mt"%(lib) for lib in boostLibs ] )
clientEnv.Prepend( LIBS=["mongoclient"])
clientEnv.Prepend( LIBPATH=["."] )
#clientEnv["CPPDEFINES"].remove( "MONGO_EXPOSE_MACROS" )
l = clientEnv[ "LIBS" ]
# examples
clientTests += [ clientEnv.Program( "firstExample" , [ "client/examples/first.cpp" ] ) ]