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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 309 - (hide annotations)
Mon Dec 5 01:59:58 2005 UTC (14 years, 2 months ago) by jgs
File size: 3396 byte(s)
now load default options - by default!

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 jgs 309 from default_options import *
54    
55 jgs 228 if hostname=='ess':
56     from ess_options import *
57    
58 jgs 241 if usegcc==1:
59     from gcc_options import *
60    
61 jgs 246 if options!=None:
62     exec "from " + options + " import *"
63    
64 jgs 228 cxx_flags=cxx_flags_debug
65    
66     #
67     # print out build configuration for this module
68    
69     print "Build configuration for module: MeshAdapter unit tests"
70     print " dodebug: 1"
71     print " usegcc: ", usegcc
72     print " cxx: ", cxx
73     print " platform: ", platform
74     print " hostname: ", hostname
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 jgs 288 finley_lib = str(esys_lib_path) + '/libfinleycpp.so'
95    
96     install_dir = str(esysroot) + '/finley/test'
97    
98 jgs 204 cpp_path = [meshadapter_test_path,
99     escript_path,
100     finley_path,
101 jgs 205 finley_cppadapter_path,
102 jgs 204 paso_path,
103     mmio_path,
104     esysUtils_path,
105     CppUnitTest_path,
106     python_path,
107     boost_path]
108    
109     lib_path = [esys_lib_path,
110     finley_lib_path,
111     mmio_lib_path,
112     esysUtils_lib_path,
113     CppUnitTest_lib_path,
114     python_lib_path,
115     boost_lib_path]
116    
117     libs = ['escriptcpp',
118     'esysUtils',
119 jgs 205 'finleycpp',
120 jgs 204 'paso',
121     'mmio',
122     'CppUnitTest',
123 jgs 239 str(python_lib),
124     str(boost_lib),
125 jgs 204 'dl',
126 jgs 252 'util']
127 jgs 204
128 jgs 252 libs.extend(sys_libs)
129 jgs 255 libs.extend(solver_libs)
130 jgs 252
131 jgs 204 sources = ['MeshAdapterTestCase.cpp',
132     'MeshAdapterTest.cpp']
133    
134     target = 'MeshAdapterTest.exe'
135    
136     meshadapter_env = Environment(ENV = os.environ)
137    
138 jgs 228 meshadapter_env.Replace(CXX = cxx)
139 jgs 204 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
140     meshadapter_env.Replace(CPPPATH = cpp_path)
141     meshadapter_env.Replace(LIBPATH = lib_path)
142     meshadapter_env.Replace(LIBS = libs)
143    
144     meshadapter_test_exe = meshadapter_env.Program(target, sources)
145 jgs 288
146     Depends(meshadapter_test_exe, finley_lib)
147    
148     meshadapter_env.Install(install_dir, meshadapter_test_exe)

  ViewVC Help
Powered by ViewVC 1.1.26