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

Contents of /trunk/bruce/test/BruceFactory/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


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

1 # Scons configuration file for bruce factory 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: BruceFactory 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 brucefactory_test_path = str(esysroot) + '/bruce/test/BruceFactory'
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 brucefactory_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 = ['BruceFactoryTestCase.cpp',
97 'BruceFactoryTest.cpp']
98
99 target = 'BruceFactoryTest.exe'
100
101 brucefactory_env = Environment(ENV = os.environ)
102
103 brucefactory_env.Replace(CXX = cxx)
104 brucefactory_env.Replace(CXXFLAGS = cxx_flags)
105 brucefactory_env.Replace(CPPPATH = cpp_path)
106 brucefactory_env.Replace(LIBPATH = lib_path)
107 brucefactory_env.Replace(LIBS = libs)
108
109 brucefactory_test_exe = brucefactory_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26