-
Notifications
You must be signed in to change notification settings - Fork 1
/
SConscript
30 lines (26 loc) · 1019 Bytes
/
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
# -*- python -*-
#
# $Header$
# Authors: James Chiang <jchiang@slac.stanford.edu>
# Version: optimizers-04-01-03
import sys
Import('baseEnv')
Import('listFiles')
progEnv = baseEnv.Clone()
libEnv = baseEnv.Clone()
if baseEnv['PLATFORM'] == "posix":
libEnv.Append(CPPDEFINES = 'TRAP_FPE')
libEnv.Tool('addLinkDeps', package='optimizers', toBuild='shared')
optimizersLib = libEnv.SharedLibrary('optimizers',
listFiles(['src/*.cxx', 'src/*.c']))
progEnv.Tool('optimizersLib')
if baseEnv['PLATFORM'] == "posix":
progEnv.Append(CPPDEFINES = 'TRAP_FPE')
if sys.platform == 'darwin':
progEnv.Append(CPPDEFINES = 'DARWIN')
test_optimizersBin = progEnv.Program('test_optimizers', 'src/test/main.cxx')
progEnv.Tool('registerTargets', package='optimizers',
libraryCxts=[[optimizersLib, libEnv]],
testAppCxts=[[test_optimizersBin, progEnv]],
includes=listFiles(['optimizers/*.h']),
xml=listFiles(['xml/*'], recursive = True))