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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26