FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
libdiffpy/SConstruct at develop · cfarrow/libdiffpy · GitHub
cfarrow
libdiffpy
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
libdiffpy
/
SConstruct
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (54 loc) · 2.04 KB
Breadcrumbs
libdiffpy
/
SConstruct
Copy path
File metadata and controls
66 lines (54 loc) · 2.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# Top level targets that are defined in subsidiary SConscripts
#
# lib -- build shared library object
# install -- install everything under prefix directory
# install-include -- install C++ header files
# install-lib -- install shared library object
import
os
import
platform
def
subdictionary
(
d
,
keyset
):
return
dict
([
kv
for
kv
in
d
.
items
()
if
kv
[
0
]
in
keyset
])
# copy system environment variables related to compilation
DefaultEnvironment
(
ENV
=
subdictionary
(
os
.
environ
, [
'PATH'
,
'PYTHONPATH'
,
'CPATH'
,
'CPLUS_INCLUDE_PATH'
,
'LIBRARY_PATH'
,
'LD_LIBRARY_PATH'
,
'DYLD_LIBRARY_PATH'
,
])
)
# Create construction environment
env
=
DefaultEnvironment
().
Clone
()
# Variables definitions below work only with 0.98 or later.
env
.
EnsureSConsVersion
(
0
,
98
)
# Customizable compile variables
vars
=
Variables
(
'sconsvars.py'
)
vars
.
Add
(
'tests'
,
'Custom list of unit test sources'
,
None
)
vars
.
Add
(
EnumVariable
(
'build'
,
'compiler settings'
,
'debug'
,
allowed_values
=
(
'debug'
,
'fast'
)))
vars
.
Add
(
BoolVariable
(
'profile'
,
'build with profiling information'
,
False
))
vars
.
Add
(
PathVariable
(
'prefix'
,
'installation prefix directory'
,
'/usr/local'
))
vars
.
Update
(
env
)
vars
.
Add
(
PathVariable
(
'libdir'
,
'object code library directory [prefix/lib]'
,
env
[
'prefix'
]
+
'/lib'
,
PathVariable
.
PathAccept
))
vars
.
Add
(
PathVariable
(
'includedir'
,
'installation directory for C++ header files [prefix/include]'
,
env
[
'prefix'
]
+
'/include'
,
PathVariable
.
PathAccept
))
vars
.
Add
(
PathVariable
(
'datadir'
,
'installation directory for architecture independent data [prefix/share]'
,
env
[
'prefix'
]
+
'/share'
,
PathVariable
.
PathAccept
))
vars
.
Add
(
BoolVariable
(
'enable_objcryst'
,
'enable objcryst support, when installed'
,
True
))
vars
.
Update
(
env
)
env
.
Help
(
vars
.
GenerateHelpText
(
env
))
builddir
=
env
.
Dir
(
'build/%s-%s'
%
(
env
[
'build'
],
platform
.
machine
()))
Export
(
'env'
)
if
os
.
path
.
isfile
(
'sconscript.local'
):
env
.
SConscript
(
'sconscript.local'
)
env
.
SConscript
(
'src/SConscript'
,
variant_dir
=
builddir
)
# vim: ft=python
Back
|
FazBrowse Home
|
New Git URL