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

Annotation of /trunk/finley/test/MeshAdapter/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 255 - (hide annotations)
Tue Nov 29 06:13:22 2005 UTC (14 years, 8 months ago) by jgs
File size: 3288 byte(s)
pass in solver libraries to link with via options files now
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 252 sys_libs = []
19 jgs 255 solver_libs = []
20 jgs 204
21 jgs 228 #
22 jgs 248 # import configuration variables passed in from
23     # calling SConscript (if any)
24    
25     Import('*')
26    
27     #
28 jgs 228 # retreive command-line arguments if any
29 jgs 204
30 jgs 228 if ARGUMENTS.get('usegcc',0):
31     usegcc = 1
32 jgs 204
33 jgs 246 if ARGUMENTS.get('options',0):
34     options = ARGUMENTS.get('options',0)
35    
36 jgs 228 #
37     # determine platform
38    
39     env = Environment(ENV = os.environ)
40     platform = env['PLATFORM']
41    
42     #
43     # determine hostname
44    
45     hostname = os.environ['HOSTNAME']
46    
47     #
48     # load configuration settings
49    
50     options_dir = str(esysroot) + '/scons'
51     sys.path.append(options_dir)
52    
53     if hostname=='ess':
54     from ess_options import *
55    
56 jgs 241 if usegcc==1:
57     from gcc_options import *
58    
59 jgs 246 if options!=None:
60     exec "from " + options + " import *"
61    
62 jgs 228 cxx_flags=cxx_flags_debug
63    
64     #
65     # print out build configuration for this module
66    
67     print "######################################################"
68     print "Build configuration for module: MeshAdapter unit tests"
69     print " dodebug: 1"
70     print " usegcc: ", usegcc
71     print " cxx: ", cxx
72     print " platform: ", platform
73     print " hostname: ", hostname
74     print "######################################################"
75    
76     #
77     # do the actual build
78    
79 jgs 204 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
80     escript_path = str(esysroot) + '/escript/inc'
81 jgs 205 finley_path = str(esysroot) + '/finley/src/finley'
82     finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
83 jgs 204 paso_path = str(esysroot) + '/paso/inc'
84     mmio_path = str(esysroot) + '/tools/mmio/inc'
85     esysUtils_path = str(esysroot) + '/esysUtils/inc'
86     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
87    
88     esys_lib_path = str(esysroot) + '/lib'
89     finley_lib_path = str(esysroot) + '/finley/lib'
90     mmio_lib_path = str(esysroot) + '/tools/mmio/lib'
91     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
92     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
93    
94     cpp_path = [meshadapter_test_path,
95     escript_path,
96     finley_path,
97 jgs 205 finley_cppadapter_path,
98 jgs 204 paso_path,
99     mmio_path,
100     esysUtils_path,
101     CppUnitTest_path,
102     python_path,
103     boost_path]
104    
105     lib_path = [esys_lib_path,
106     finley_lib_path,
107     mmio_lib_path,
108     esysUtils_lib_path,
109     CppUnitTest_lib_path,
110     python_lib_path,
111     boost_lib_path]
112    
113     libs = ['escriptcpp',
114     'esysUtils',
115 jgs 205 'finleycpp',
116 jgs 204 'paso',
117     'mmio',
118     'CppUnitTest',
119 jgs 239 str(python_lib),
120     str(boost_lib),
121 jgs 204 'dl',
122 jgs 252 'util']
123 jgs 204
124 jgs 252 libs.extend(sys_libs)
125 jgs 255 libs.extend(solver_libs)
126 jgs 252
127 jgs 204 sources = ['MeshAdapterTestCase.cpp',
128     'MeshAdapterTest.cpp']
129    
130     target = 'MeshAdapterTest.exe'
131    
132     meshadapter_env = Environment(ENV = os.environ)
133    
134 jgs 228 meshadapter_env.Replace(CXX = cxx)
135 jgs 204 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
136     meshadapter_env.Replace(CPPPATH = cpp_path)
137     meshadapter_env.Replace(LIBPATH = lib_path)
138     meshadapter_env.Replace(LIBS = libs)
139    
140     meshadapter_test_exe = meshadapter_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26