/[escript]/branches/arrayview_from_1695_trunk/esysUtils/test/SConscript
ViewVC logotype

Contents of /branches/arrayview_from_1695_trunk/esysUtils/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations)
Mon Nov 28 06:14:47 2005 UTC (13 years, 9 months ago) by jgs
Original Path: trunk/esysUtils/test/EsysException/SConstruct
File size: 2201 byte(s)
if usegcc=1 is set on command line, load compiler options
fropm scons/gcc_options.py

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

  ViewVC Help
Powered by ViewVC 1.1.26