forked from boostorg/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConscript
More file actions
34 lines (30 loc) · 1.41 KB
/
SConscript
File metadata and controls
34 lines (30 loc) · 1.41 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
# -*- python -*-
Import("env")
env.Append(CPPPATH = "#/include",CPPDEFINES = ["BOOST_ALL_NO_LIB=1"])
env.AppendUnique(CPPDEFINES = ["${LINK_DYNAMIC and 'BOOST_PYTHON_DYN_LINK=1' or []}"])
for variant in env["variant"]:
env["current_variant"] = variant
env.SetProperty(profile = False)
if variant == "release":
env.SetProperty(optimize = "speed", debug = False)
elif variant == "debug":
env.SetProperty(optimize = "no", debug = True)
elif variant == "profile":
env.SetProperty(optimize = "speed", profile = True, debug = True)
for linking in env["link"]:
env["linking"] = linking
if linking == "dynamic":
env["LINK_DYNAMIC"] = True
else:
env["LINK_DYNAMIC"] = False
for threading in env["threading"]:
env["current_threading"] = threading
env.SetProperty(threading = threading)
variant_dir=env.subst("$BOOST_CURRENT_VARIANT_DIR")
env.SConscript("src/SConscript", variant_dir=variant_dir + '/src',
exports = { "env" : env.Clone(BOOST_LIB = 'python') })
if GetOption("test"):
test_env = env.Clone(BOOST_LIB = 'python', BOOST_TEST = True)
test_env.BoostUseLib('python')
env.SConscript("test/SConscript", variant_dir=variant_dir + '/test',
exports = { "env" : test_env })