/[escript]/trunk/escript/src/SConscript
ViewVC logotype

Contents of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2482 - (show annotations)
Fri Jun 19 05:56:20 2009 UTC (10 years, 7 months ago) by jfenwick
File size: 3745 byte(s)
Added run_data_access.py to unit tests - tests things like toListOfTuples.
Corrected some doco comments.
Added TestDomain class to escript.
This should allow more testing without resorting to finley.
1 ########################################################
2 #
3 # Copyright (c) 2003-2008 by University of Queensland
4 # Earth Systems Science Computational Center (ESSCC)
5 # http://www.uq.edu.au/esscc
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 ########################################################
12
13
14 import os
15 Import('*')
16
17 local_env = clone_env(env_mpi)
18 py_wrapper_local_env = clone_env(env_mpi)
19
20 # Remove the sharedlibrary prefix on all platform - we don't want 'lib' mucking with our python modules
21 del py_wrapper_local_env['SHLIBPREFIX']
22
23 sources = """
24 AbstractContinuousDomain.cpp
25 AbstractDomain.cpp
26 AbstractSystemMatrix.cpp
27 AbstractTransportProblem.cpp
28 BufferGroup.cpp
29 Data.cpp
30 DataAbstract.cpp
31 DataBlocks2D.cpp
32 DataC.cpp
33 DataConstant.cpp
34 DataEmpty.cpp
35 DataException.cpp
36 DataExpanded.cpp
37 DataFactory.cpp
38 DataLazy.cpp
39 DataMaths.cpp
40 DataReady.cpp
41 DataTagged.cpp
42 DataTypes.cpp
43 DataVector.cpp
44 DomainException.cpp
45 EscriptParams.cpp
46 FunctionSpace.cpp
47 FunctionSpaceException.cpp
48 FunctionSpaceFactory.cpp
49 NullDomain.cpp
50 SystemMatrixException.cpp
51 Taipan.cpp
52 TestDomain.cpp
53 TransportProblemException.cpp
54 Utils.cpp
55 WrappedArray.cpp
56 """.split()
57 # blocktimer.c
58 headers = """
59 AbstractContinuousDomain.h
60 AbstractDomain.h
61 AbstractSystemMatrix.h
62 AbstractTransportProblem.h
63 BinaryOp.h
64 BufferGroup.h
65 Data.h
66 DataAbstract.h
67 DataAlgorithm.h
68 DataBlocks2D.h
69 DataC.h
70 DataConstant.h
71 DataEmpty.h
72 DataException.h
73 DataExpanded.h
74 DataFactory.h
75 DataLazy.h
76 DataMaths.h
77 DataReady.h
78 DataTagged.h
79 DataTypes.h
80 DataVector.h
81 DomainException.h
82 EscriptParams.h
83 FunctionSpace.h
84 FunctionSpaceException.h
85 FunctionSpaceFactory.h
86 LocalOps.h
87 NullDomain.h
88 Pointers.h
89 SystemMatrixException.h
90 Taipan.h
91 TestDomain.h
92 TransportProblemException.h
93 UnaryFuncs.h
94 UnaryOp.h
95 UtilC.h
96 Utils.h
97 WrappedArray.h
98 esysmpi.h
99 system_dep.h
100 """.split()
101 # blocktimer.h
102
103 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
104
105 if IS_WINDOWS_PLATFORM :
106 local_env.Append(CPPDEFINES = ['ESCRIPT_EXPORTS'])
107
108 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
109
110 module_name = 'escript'
111 py_wrapper_name = module_name + 'cpp'
112
113 lib = local_env.SharedLibrary(module_name, sources)
114 env.Alias('target_escript_so', lib)
115
116 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
117 env.Alias('target_escriptcpp_so', py_wrapper_lib)
118
119 include_path = Dir('escript', local_env['incinstall'])
120
121 tmp1 = local_env.Install(include_path, headers )
122 env.Alias('target_install_escript_headers', [tmp1])
123
124 tmp3 = local_env.Install(local_env['libinstall'], lib)
125 env.Alias('target_install_escript_so', tmp3)
126
127 #windows specific mod
128 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
129 if os.name == 'nt':
130 wrapper_postfix = '.pyd'
131 else:
132 wrapper_postfix = '.so'
133
134 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
135
136 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
137 source=py_wrapper_lib[0])
138
139 env.Alias('target_install_escriptcpp_so', tmp4)
140
141 # export the lib target since tests will depend on it
142 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
143 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
144 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
145 Export('dep_lib')
146
147 # Call the python sconscript
148 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
149
150 # Call the unit tests SConscript
151 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
152

  ViewVC Help
Powered by ViewVC 1.1.26