/[escript]/trunk/esysUtils/test/SConscript
ViewVC logotype

Annotation of /trunk/esysUtils/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 227 - (hide annotations)
Fri Nov 25 01:49:23 2005 UTC (13 years, 10 months ago) by jgs
Original Path: trunk/esysUtils/test/EsysException/SConstruct
File size: 2158 byte(s)
now load compile options from options file

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     cxx_flags=cxx_flags_debug
44    
45     #
46     # print out build configuration for this module
47    
48     print "####################################################"
49     print "Build configuration for module: Bruce unit tests"
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 jgs 197 esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'
62     esysUtils_path = str(esysroot) + '/esysUtils/inc'
63     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
64    
65     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
66     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
67    
68     cpp_path = [esysexception_test_path,
69     esysUtils_path,
70     CppUnitTest_path]
71    
72     lib_path = [esysUtils_lib_path,
73     CppUnitTest_lib_path]
74    
75     libs = ['esysUtils',
76     'CppUnitTest',
77     'guide',
78     'irc']
79    
80     sources = ['EsysExceptionTestCase.cpp',
81     'EsysExceptionTest.cpp']
82    
83     target = 'EsysExceptionTest.exe'
84    
85     esysexception_env = Environment(ENV = os.environ)
86    
87 jgs 227 esysexception_env.Replace(CXX = cxx)
88 jgs 197 esysexception_env.Replace(CXXFLAGS = cxx_flags)
89     esysexception_env.Replace(CPPPATH = cpp_path)
90     esysexception_env.Replace(LIBPATH = lib_path)
91     esysexception_env.Replace(LIBS = libs)
92    
93     esysexception_test_exe = esysexception_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26