/[escript]/trunk/finley/test/MeshAdapter/SConscript
ViewVC logotype

Annotation of /trunk/finley/test/MeshAdapter/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 248 - (hide annotations)
Tue Nov 29 04:58:23 2005 UTC (14 years, 2 months ago) by jgs
Original Path: trunk/finley/test/MeshAdapter/SConstruct
File size: 3259 byte(s)
add top level scons config files to allow building
of all unit tests for each module at once

1 jgs 228 # Scons configuration file for finley MeshAdapter unit tests
2 jgs 204
3     import os
4 jgs 228 import sys
5 jgs 204
6 jgs 228 #
7     # ensure correct versions of python and scons
8 jgs 204
9 jgs 228 EnsurePythonVersion(2,3)
10     EnsureSConsVersion(0,96)
11 jgs 204
12 jgs 228 #
13     # set appropriate defaults for configuration variables
14 jgs 204
15 jgs 228 esysroot = Dir('#../../..')
16     usegcc = 0
17 jgs 246 options = None
18 jgs 204
19 jgs 228 #
20 jgs 248 # import configuration variables passed in from
21     # calling SConscript (if any)
22    
23     Import('*')
24    
25     #
26 jgs 228 # retreive command-line arguments if any
27 jgs 204
28 jgs 228 if ARGUMENTS.get('usegcc',0):
29     usegcc = 1
30 jgs 204
31 jgs 246 if ARGUMENTS.get('options',0):
32     options = ARGUMENTS.get('options',0)
33    
34 jgs 228 #
35     # determine platform
36    
37     env = Environment(ENV = os.environ)
38     platform = env['PLATFORM']
39    
40     #
41     # determine hostname
42    
43     hostname = os.environ['HOSTNAME']
44    
45     #
46     # load configuration settings
47    
48     options_dir = str(esysroot) + '/scons'
49     sys.path.append(options_dir)
50    
51     if hostname=='ess':
52     from ess_options import *
53    
54 jgs 241 if usegcc==1:
55     from gcc_options import *
56    
57 jgs 246 if options!=None:
58     exec "from " + options + " import *"
59    
60 jgs 228 cxx_flags=cxx_flags_debug
61    
62     #
63     # print out build configuration for this module
64    
65     print "######################################################"
66     print "Build configuration for module: MeshAdapter unit tests"
67     print " dodebug: 1"
68     print " usegcc: ", usegcc
69     print " cxx: ", cxx
70     print " platform: ", platform
71     print " hostname: ", hostname
72     print "######################################################"
73    
74     #
75     # do the actual build
76    
77 jgs 204 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
78     escript_path = str(esysroot) + '/escript/inc'
79 jgs 205 finley_path = str(esysroot) + '/finley/src/finley'
80     finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
81 jgs 204 paso_path = str(esysroot) + '/paso/inc'
82     mmio_path = str(esysroot) + '/tools/mmio/inc'
83     esysUtils_path = str(esysroot) + '/esysUtils/inc'
84     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
85    
86     esys_lib_path = str(esysroot) + '/lib'
87     finley_lib_path = str(esysroot) + '/finley/lib'
88     mmio_lib_path = str(esysroot) + '/tools/mmio/lib'
89     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
90     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
91    
92     cpp_path = [meshadapter_test_path,
93     escript_path,
94     finley_path,
95 jgs 205 finley_cppadapter_path,
96 jgs 204 paso_path,
97     mmio_path,
98     esysUtils_path,
99     CppUnitTest_path,
100     python_path,
101     boost_path]
102    
103     lib_path = [esys_lib_path,
104     finley_lib_path,
105     mmio_lib_path,
106     esysUtils_lib_path,
107     CppUnitTest_lib_path,
108     python_lib_path,
109     boost_lib_path]
110    
111     libs = ['escriptcpp',
112     'esysUtils',
113 jgs 205 'finleycpp',
114 jgs 204 'paso',
115     'mmio',
116     'CppUnitTest',
117 jgs 239 str(python_lib),
118     str(boost_lib),
119 jgs 204 'scs_mp',
120     'dl',
121     'util',
122     'guide',
123     'irc']
124    
125     sources = ['MeshAdapterTestCase.cpp',
126     'MeshAdapterTest.cpp']
127    
128     target = 'MeshAdapterTest.exe'
129    
130     meshadapter_env = Environment(ENV = os.environ)
131    
132 jgs 228 meshadapter_env.Replace(CXX = cxx)
133 jgs 204 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
134     meshadapter_env.Replace(CPPPATH = cpp_path)
135     meshadapter_env.Replace(LIBPATH = lib_path)
136     meshadapter_env.Replace(LIBS = libs)
137    
138     meshadapter_test_exe = meshadapter_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26