-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis-sconscript.local
34 lines (27 loc) · 1.04 KB
/
.travis-sconscript.local
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
# Customize scons build environment.
Import('env')
import os
# Workaround: DEBUG_CPPFLAGS is defined on Linux, but not on Mac OS X.
# Make sure it is always sensibly defined.
os.environ.setdefault('DEBUG_CPPFLAGS', os.environ['CPPFLAGS'])
# Apply environment settings for Anaconda compilers
env.Replace(CXX=os.environ['CXX'])
if env['build'] == 'fast':
env.MergeFlags(os.environ['CFLAGS'])
env.MergeFlags(os.environ['CPPFLAGS'])
env.MergeFlags(os.environ['CXXFLAGS'])
else:
env.MergeFlags(os.environ['DEBUG_CFLAGS'])
env.MergeFlags(os.environ['DEBUG_CPPFLAGS'])
env.MergeFlags(os.environ['DEBUG_CXXFLAGS'])
env.MergeFlags(os.environ['LDFLAGS'])
# Silence copious warnings from the boost headers.
P = os.environ['MYPREFIX']
env.Prepend(CCFLAGS=['-isystem{}/include'.format(P)])
# Define path to the shared libraries from Anaconda environment.
L = P + '/lib'
env.Append(LIBPATH=L)
env.Append(LINKFLAGS='-Wl,-rpath,{!r}'.format(L))
if env['PLATFORM'] == 'posix':
env.Append(LINKFLAGS='-Wl,-rpath-link,{!r}'.format(L))
# vim: ft=python