-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathSConscript
More file actions
57 lines (47 loc) · 1.51 KB
/
Copy pathSConscript
File metadata and controls
57 lines (47 loc) · 1.51 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Import('env')
import os
import sys
import subprocess
#
# Inherit environment from outside for these environment variables
#
TOOLCHAIN = ["CC", "CXX", "LD", "AR", "AS", "STRIP"]
for envvar in TOOLCHAIN:
if envvar in os.environ:
env.Replace(**{envvar: os.environ[envvar]})
# Avoid doing dependency checks on garden files.
if True:
cpp=[]
flg=[]
for p in env['CPPPATH']:
if p.startswith('/proj') or p.startswith('/gdn'):
flg.append('-I%s' % p)
else:
cpp.append(p)
env.Replace(CPPPATH=cpp)
env.Append(CFLAGS=flg, CXXFLAGS=flg)
env.Append(
# SSE2 for src/within.hxx. It's optional, but way way slower without.
CCFLAGS=['-O2', '-g', '-msse4.1'],
CFLAGS='-Wall',
# sadly, need -Wno-deprecated-declarations because of boost.
CXXFLAGS="-std=c++11 -Wall -Wno-deprecated-declarations",
#CPPDEFINES=[
#'BOOST_SYSTEM_NO_DEPRECATED',
#],
LINKFLAGS='-g'
)
if env['PLATFORM']=='darwin':
env.Append(CXXFLAGS='-ftemplate-depth=500')
env.SConsignFile('%s/.sconsign' % (env['OBJDIR'].strip('#')))
env.SConscript('src/SConscript')
env.SConscript('tests/SConscript')
env.SConscript('external/inchi/SConscript')
env.SConscript('external/lpsolve/SConscript')
env.AddShare('env.sh')
env.SConscript('python/SConscript')
env.SConscript('tools/SConscript')
wver = os.getenv("BUILD_WHEEL_VERSION")
if wver is not None:
env['WHEEL_DIR'] = 'wheel/dist'
env.AddWheel('pyproject.toml', pyver=wver)