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

Contents of /trunk/finley/test/MeshAdapter/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 355 - (show annotations)
Wed Dec 14 05:05:31 2005 UTC (13 years, 4 months ago) by jgs
File size: 3430 byte(s)
add explicit target for building of unit tests

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

  ViewVC Help
Powered by ViewVC 1.1.26