Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5361a8c577
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 39 lines (27 sloc) 0.91 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
# -*- mode: python; -*-
import os

env = Environment()

env.Append(CPPFLAGS=['-pthread', '-O3', '-g'])
env.Append(LINKFLAGS=['-pthread', '-g'])

if 'darwin' == os.sys.platform:
    env.Append(CPPPATH=['/opt/local/include'])
    env.Append(LIBPATH=['/opt/local/lib'])

env.Append(CPPPATH=['../', '../mongo/'])
env.Append(LIBPATH=['../mongo', '/usr/lib64'])

conf = Configure( env )
libs = [ "mongoclient", "boost_thread" , "boost_filesystem" , 'boost_program_options', 'boost_system']

def checkLib( lib ):
    if lib.startswith('boost_'):
        if conf.CheckLib( lib + '-mt' ):
            return True
        if conf.CheckLib( lib + '_mt' ):
            return True

    if conf.CheckLib( lib ):
        return True

    print( "Error: can't find library: " + str( lib ) )
    Exit(-1)
    return False

for x in libs:
    checkLib( x )

env = conf.Finish()

env.Program( "benchmark" , ["benchmark.cpp"] )
Something went wrong with that request. Please try again.