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

Annotation of /branches/arrayview_from_1695_trunk/esysUtils/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (hide 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 jgs 227 # Scons configuration file for esysUtils unit tests
2 jgs 197
3     import os
4 jgs 227 import sys
5 jgs 197
6 jgs 227 # ensure correct versions of python and scons
7 jgs 197
8 jgs 227 EnsurePythonVersion(2,3)
9     EnsureSConsVersion(0,96)
10 jgs 197
11 jgs 227 #
12     # set appropriate defaults for configuration variables
13 jgs 197
14 jgs 227 esysroot = Dir('#../../..')
15     usegcc = 0
16 jgs 197
17 jgs 227 #
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 jgs 241 if usegcc==1:
44     from gcc_options import *
45    
46 jgs 227 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 jgs 197 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 jgs 227 esysexception_env.Replace(CXX = cxx)
91 jgs 197 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