diff options
-rw-r--r-- | SConstruct | 11 | ||||
-rw-r--r-- | distsrc/client/SConstruct | 20 |
2 files changed, 31 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 8346e00474c..305f961dc8f 100644 --- a/SConstruct +++ b/SConstruct @@ -369,6 +369,7 @@ class InstallSetup: self.headers = False self.bannerDir = None self.headerRoot = "include" + self.clientTestsDir = None def justClient(self): self.binaries = False @@ -376,6 +377,7 @@ class InstallSetup: self.headers = True self.bannerDir = "distsrc/client/" self.headerRoot = "" + self.clientTestsDir = "client/examples/" installSetup = InstallSetup() if distBuild: @@ -1521,6 +1523,15 @@ if installSetup.bannerDir: continue env.Install( installDir , full ) +if installSetup.clientTestsDir: + for x in os.listdir( installSetup.clientTestsDir ): + full = installSetup.clientTestsDir + "/" + x + if os.path.isdir( full ): + continue + if x.find( "~" ) >= 0: + continue + env.Install( installDir + '/' + installSetup.clientTestsDir , full ) + #final alias env.Alias( "install" , installDir ) diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index f2d5e655a59..8aa279be4a4 100644 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -35,6 +35,8 @@ elif "linux2" == os.sys.platform: if nix: env.Append( CPPFLAGS=" -O3" ) +boostLibs = [ "thread" , "filesystem" , "system" ] +env.Prepend( LIBS =["boost_%s-mt"%(lib) for lib in boostLibs ] ) allClientFiles = [] allClientFiles += Glob( "mongo/*.cpp" ) allClientFiles += Glob( "mongo/client/*.cpp" ) @@ -46,3 +48,21 @@ allClientFiles += Glob( "mongo/util/*.cpp" ) allClientFiles += Glob( "mongo/util/*.c" ) env.Library( "mongoclient" , allClientFiles ) +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( LIBPATH=["."] ) +#clientEnv["CPPDEFINES"].remove( "MONGO_EXPOSE_MACROS" ) +l = clientEnv[ "LIBS" ] + +# examples +clientTests += [ clientEnv.Program( "firstExample" , [ "client/examples/first.cpp" ] ) ] +clientTests += [ clientEnv.Program( "secondExample" , [ "client/examples/second.cpp" ] ) ] +clientTests += [ clientEnv.Program( "whereExample" , [ "client/examples/whereExample.cpp" ] ) ] +clientTests += [ clientEnv.Program( "authTest" , [ "client/examples/authTest.cpp" ] ) ] +clientTests += [ clientEnv.Program( "httpClientTest" , [ "client/examples/httpClientTest.cpp" ] ) ] +clientTests += [ clientEnv.Program( "clientTest" , [ "client/examples/clientTest.cpp" ] ) ] |