/[escript]/trunk/bruce/test/Bruce/SConstruct
ViewVC logotype

Contents of /trunk/bruce/test/Bruce/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (show annotations)
Fri Nov 25 01:40:04 2005 UTC (14 years, 10 months ago) by jgs
File size: 2423 byte(s)
import compile options into bruce unit test builds from options file now

1 # Scons configuration file for bruce unit tests
2
3 import os
4 import sys
5
6 #
7 # ensure correct versions of python and scons
8
9 EnsurePythonVersion(2,3)
10 EnsureSConsVersion(0,96)
11
12 #
13 # set appropriate defaults for configuration variables
14
15 esysroot = Dir('#../../..')
16 usegcc = 0
17
18 #
19 # retreive command-line arguments if any
20
21 if ARGUMENTS.get('usegcc',0):
22 usegcc = 1
23
24 #
25 # determine platform
26
27 env = Environment(ENV = os.environ)
28 platform = env['PLATFORM']
29
30 #
31 # determine hostname
32
33 hostname = os.environ['HOSTNAME']
34
35 #
36 # load configuration settings
37
38 options_dir = str(esysroot) + '/scons'
39 sys.path.append(options_dir)
40
41 if hostname=='ess':
42 from ess_options import *
43
44 cxx_flags=cxx_flags_debug
45
46 #
47 # print out build configuration for this module
48
49 print "####################################################"
50 print "Build configuration for module: Bruce unit tests"
51 print " dodebug: 1"
52 print " usegcc: ", usegcc
53 print " cxx: ", cxx
54 print " platform: ", platform
55 print " hostname: ", hostname
56 print "####################################################"
57
58 #
59 # do the actual build
60
61 bruce_path = str(esysroot) + '/bruce/inc'
62 bruce_test_path = str(esysroot) + '/bruce/test/Bruce'
63 escript_path = str(esysroot) + '/escript/inc'
64 esysUtils_path = str(esysroot) + '/esysUtils/inc'
65 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
66
67 esys_lib_path = str(esysroot) + '/lib'
68 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
69 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
70
71 cpp_path = [bruce_path,
72 bruce_test_path,
73 escript_path,
74 esysUtils_path,
75 CppUnitTest_path,
76 python_path,
77 boost_path]
78
79 lib_path = [esys_lib_path,
80 esysUtils_lib_path,
81 CppUnitTest_lib_path,
82 python_lib_path,
83 boost_lib_path]
84
85 libs = ['brucecpp',
86 'escriptcpp',
87 'esysUtils',
88 'CppUnitTest',
89 'python2.3',
90 'boost_python-intel-d-1_31',
91 'dl',
92 'util',
93 'guide',
94 'irc']
95
96 sources = ['BruceTestCase.cpp',
97 'BruceTest.cpp']
98
99 target = 'BruceTest.exe'
100
101 bruce_env = Environment(ENV = os.environ)
102
103 bruce_env.Replace(CXX = cxx)
104 bruce_env.Replace(CXXFLAGS = cxx_flags)
105 bruce_env.Replace(CPPPATH = cpp_path)
106 bruce_env.Replace(LIBPATH = lib_path)
107 bruce_env.Replace(LIBS = libs)
108
109 bruce_test_exe = bruce_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26