-
Notifications
You must be signed in to change notification settings - Fork 3
/
SConscript
87 lines (78 loc) · 3.21 KB
/
SConscript
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
77
78
79
80
81
82
83
84
85
86
87
import libtbx.load_env
Import("env_base","env_etc")
try:
env_etc.annlib_dist = libtbx.env.dist_path("annlib")
except KeyError:
from libtbx.env_config import get_local_env
local_env = get_local_env(build_dir=GetLaunchDir())
if local_env is not None:
env_etc.annlib_dist = local_env.find_in_repositories("annlib")
else:
raise
env_etc.annlib_include = [env_etc.norm_join(env_etc.annlib_dist,"src"),
env_etc.norm_join(env_etc.annlib_dist,"include")]
env_etc.annlib_adaptbx_dist = libtbx.env.dist_path("annlib_adaptbx")
env_etc.annlib_adaptbx_include = [
libtbx.env.under_dist("annlib_adaptbx", "include"),
libtbx.env.under_build("annlib_adaptbx/include")]
env_etc.annlib_common_includes = [
env_etc.libtbx_include,
env_etc.scitbx_include,
env_etc.boost_adaptbx_include,
env_etc.boost_include,
env_etc.annlib_dist, # for the adaptor cpp files
env_etc.annlib_include[0],
env_etc.annlib_include[1],
env_etc.annlib_adaptbx_include[0],
env_etc.annlib_adaptbx_include[1],
]
if not libtbx.env.module_is_installed("annlib_adaptbx"):
env = env_base.Clone(
SHLINKFLAGS=env_etc.shlinkflags)
env.Append(CPPPATH=env_etc.annlib_common_includes)
if (libtbx.manual_date_stamp < 20090819):
# XXX backward compatibility 2009-08-19
env.Replace(CCFLAGS=env_etc.ccflags_base)
env.Replace(CXXFLAGS=env_etc.cxxflags_base)
env.Replace(SHCXXFLAGS=env_etc.cxxflags_base)
if (env_etc.static_libraries): builder = env.StaticLibrary
else: builder = env.SharedLibrary
builder(target='#lib/ann',
source = ["../annlib/src/ANN.cpp",
"../annlib/src/bd_fix_rad_search.cpp",
"../annlib/src/bd_pr_search.cpp",
"../annlib/src/bd_search.cpp",
"../annlib/src/bd_tree.cpp",
"../annlib/src/brute.cpp",
"../annlib/src/kd_dump.cpp",
"../annlib/src/kd_fix_rad_search.cpp",
"../annlib/src/kd_pr_search.cpp",
"../annlib/src/kd_search.cpp",
"../annlib/src/kd_split.cpp",
"../annlib/src/kd_tree.cpp",
"../annlib/src/kd_util.cpp",
"../annlib/src/perf.cpp",
"self_include/ANN.cpp",
"self_include/bd_fix_rad_search.cpp",
"self_include/bd_pr_search.cpp",
"self_include/bd_search.cpp",
"self_include/bd_tree.cpp",
"self_include/brute.cpp",
"self_include/kd_dump.cpp",
"self_include/kd_fix_rad_search.cpp",
"self_include/kd_pr_search.cpp",
"self_include/kd_search.cpp",
"self_include/kd_split.cpp",
"self_include/kd_tree.cpp",
"self_include/kd_util.cpp",
"self_include/perf.cpp",
"ann/ann_adaptor.cpp"
])
if (not env_etc.no_boost_python):
Import("env_no_includes_boost_python_ext")
env_annlib_boost_python_ext = env_no_includes_boost_python_ext.Clone()
env_etc.include_registry.append(
env=env_annlib_boost_python_ext,
paths=env_etc.annlib_common_includes + [env_etc.python_include])
Export("env_annlib_boost_python_ext")
SConscript("ann/boost_python/SConscript")