2012-06-10 15:27:41 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
# NOTE: This file is automatically generated by bundle.sh script
|
|
|
|
# If you're doing changes in this file, please update template
|
|
|
|
# in that script too
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
2014-03-25 08:21:30 +00:00
|
|
|
from unordered_map import test_unordered_map
|
|
|
|
|
2012-06-10 15:27:41 +00:00
|
|
|
Import('env')
|
|
|
|
|
|
|
|
src = []
|
|
|
|
defs = []
|
|
|
|
|
|
|
|
src += env.Glob('internal/ceres/*.cc')
|
2012-06-14 13:33:37 +00:00
|
|
|
src += env.Glob('internal/ceres/generated/schur_eliminator_d_d_d.cc')
|
2013-11-28 13:06:35 +00:00
|
|
|
src += env.Glob('internal/ceres/generated/partitioned_matrix_view_d_d_d.cc')
|
2012-06-14 13:33:37 +00:00
|
|
|
#src += env.Glob('internal/ceres/generated/*.cc')
|
2012-06-10 15:27:41 +00:00
|
|
|
|
|
|
|
defs.append('CERES_HAVE_PTHREAD')
|
|
|
|
defs.append('CERES_NO_SUITESPARSE')
|
2012-09-16 12:24:37 +00:00
|
|
|
defs.append('CERES_NO_CXSPARSE')
|
2013-09-05 10:48:44 +00:00
|
|
|
defs.append('CERES_NO_LAPACK')
|
2012-06-14 13:33:37 +00:00
|
|
|
defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
|
2013-02-26 17:52:10 +00:00
|
|
|
defs.append('CERES_HAVE_RWLOCK')
|
|
|
|
|
|
|
|
if env['WITH_BF_OPENMP']:
|
|
|
|
defs.append('CERES_USE_OPENMP')
|
2012-06-10 15:27:41 +00:00
|
|
|
|
2014-03-25 08:21:30 +00:00
|
|
|
def define_unordered_map(conf):
|
|
|
|
found, namespace, include_prefix = test_unordered_map(conf)
|
|
|
|
if found:
|
|
|
|
if not include_prefix:
|
|
|
|
if namespace == 'std':
|
|
|
|
defs.append('CERES_STD_UNORDERED_MAP')
|
|
|
|
return True
|
|
|
|
elif namespace == 'std::tr1':
|
|
|
|
defs.append('CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE')
|
|
|
|
return True
|
|
|
|
else:
|
|
|
|
if namespace == 'std::tr1':
|
|
|
|
defs.append('CERES_TR1_UNORDERED_MAP')
|
|
|
|
return True
|
|
|
|
return False
|
2013-11-28 19:46:08 +00:00
|
|
|
|
2014-03-25 08:21:30 +00:00
|
|
|
conf = Configure(env)
|
|
|
|
if not define_unordered_map(conf):
|
2013-11-28 13:06:35 +00:00
|
|
|
print("-- Replacing unordered_map/set with map/set (warning: slower!)")
|
|
|
|
defs.append('CERES_NO_UNORDERED_MAP')
|
|
|
|
env = conf.Finish()
|
2012-09-16 12:24:37 +00:00
|
|
|
|
2012-06-10 15:27:41 +00:00
|
|
|
incs = '. ../../ ../../../Eigen3 ./include ./internal ../gflags'
|
|
|
|
|
2012-09-11 11:54:10 +00:00
|
|
|
# work around broken hashtable in 10.5 SDK
|
|
|
|
if env['OURPLATFORM'] == 'darwin' and env['WITH_BF_BOOST']:
|
|
|
|
incs += ' ' + env['BF_BOOST_INC']
|
|
|
|
defs.append('CERES_HASH_BOOST')
|
|
|
|
|
2012-06-10 15:27:41 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
|
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
|
|
|
incs += ' ../msinttypes'
|
|
|
|
|
|
|
|
incs += ' ../glog/src/windows'
|
|
|
|
else:
|
|
|
|
incs += ' ../glog/src'
|
|
|
|
|
|
|
|
env.BlenderLib ( libname = 'extern_ceres', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137])
|