Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SConscript « ceres « third_party « libmv « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2573a9742ad6f093ff0876f9db8304f9539eb021 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/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

Import('env')

src = []
defs = []

src += env.Glob('internal/ceres/*.cc')
src += env.Glob('internal/ceres/generated/schur_eliminator_d_d_d.cc')
src += env.Glob('internal/ceres/generated/partitioned_matrix_view_d_d_d.cc')
#src += env.Glob('internal/ceres/generated/*.cc')

defs.append('CERES_HAVE_PTHREAD')
defs.append('CERES_NO_SUITESPARSE')
defs.append('CERES_NO_CXSPARSE')
defs.append('CERES_NO_LAPACK')
defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
defs.append('CERES_HAVE_RWLOCK')

if env['WITH_BF_OPENMP']:
    defs.append('CERES_USE_OPENMP')

conf = Configure(env)
if conf.CheckCXXHeader("unordered_map"):
    # Even so we've found unordered_map header file it doesn't
    # mean unordered_map and unordered_set will be declared in
    # std namespace.
    #
    # Namely, MSVC 2008 have unordered_map header which declares
    # unordered_map class in std::tr1 namespace. In order to support
    # this, we do extra check to see which exactly namespace is
    # to be used.

    if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
        defs.append('CERES_STD_UNORDERED_MAP')
        print("-- Found unordered_map/set in std namespace.")
    elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
        defs.append('CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE')
        print("-- Found unordered_map/set in std::tr1 namespace.")
    else:
        print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
        print("-- Replacing unordered_map/set with map/set (warning: slower!)")
        defs.append('CERES_NO_UNORDERED_MAP')
elif conf.CheckCXXHeader("tr1/unordered_map"):
    defs.append('CERES_TR1_UNORDERED_MAP')
    print("-- Found unordered_map/set in std::tr1 namespace.")
else:
    print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
    print("-- Replacing unordered_map/set with map/set (warning: slower!)")
    defs.append('CERES_NO_UNORDERED_MAP')

env = conf.Finish()

incs = '. ../../ ../../../Eigen3 ./include ./internal ../gflags'

# 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')

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])