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

Contents of /trunk/escript/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1897 - (show annotations)
Mon Oct 20 00:32:30 2008 UTC (11 years, 1 month ago) by jfenwick
File size: 3511 byte(s)
Modified Data::toString() so it doesn't throw on DataEmpty.
Added setEscriptParamInt and getEscriptParamInt as free functions.
At the moment all they do is allow you to set the param TOO_MANY_LINES.
This is used to determine when printing a Data object will show you the 
points and when it will print a summary.

I've set the default value back to 80 lines.
If you need to see more lines use (in python):

setEscriptParamInt("TOO_MANY_LINES",80000)


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 Data.cpp
29 DataAbstract.cpp
30 DataBlocks2D.cpp
31 DataC.cpp
32 DataConstant.cpp
33 DataEmpty.cpp
34 DataException.cpp
35 DataExpanded.cpp
36 DataFactory.cpp
37 DataMaths.cpp
38 DataTagged.cpp
39 DataTypes.cpp
40 DataVector.cpp
41 DomainException.cpp
42 EscriptParams.cpp
43 FunctionSpace.cpp
44 FunctionSpaceException.cpp
45 FunctionSpaceFactory.cpp
46 NullDomain.cpp
47 SystemMatrixException.cpp
48 Taipan.cpp
49 TransportProblemException.cpp
50 Utils.cpp
51 blocktimer.c
52 """.split()
53 headers = """
54 AbstractContinuousDomain.h
55 AbstractDomain.h
56 AbstractSystemMatrix.h
57 AbstractTransportProblem.h
58 BinaryOp.h
59 Data.h
60 DataAbstract.h
61 DataAlgorithm.h
62 DataBlocks2D.h
63 DataC.h
64 DataConstant.h
65 DataEmpty.h
66 DataException.h
67 DataExpanded.h
68 DataFactory.h
69 DataMaths.h
70 DataTagged.h
71 DataTypes.h
72 DataVector.h
73 DomainException.h
74 EscriptParams.h
75 FunctionSpace.h
76 FunctionSpaceException.h
77 FunctionSpaceFactory.h
78 LocalOps.h
79 NullDomain.h
80 Pointers.h
81 SystemMatrixException.h
82 Taipan.h
83 TransportProblemException.h
84 UnaryFuncs.h
85 UnaryOp.h
86 UtilC.h
87 Utils.h
88 blocktimer.h
89 esysmpi.h
90 system_dep.h
91 """.split()
92
93 local_env.Append(LIBS = [ 'esysUtils'] + env['sys_libs'] )
94 py_wrapper_local_env.Append(LIBS = [ 'escript', 'esysUtils'] + env['sys_libs'])
95
96 module_name = 'escript'
97 py_wrapper_name = module_name + 'cpp'
98
99 lib = local_env.SharedLibrary(module_name, sources)
100 env.Alias('target_escript_so', lib)
101
102 py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptcpp.cpp')
103 env.Alias('target_escriptcpp_so', py_wrapper_lib)
104
105 include_path = Dir('escript', local_env['incinstall'])
106
107 tmp1 = local_env.Install(include_path, headers )
108 env.Alias('target_install_escript_headers', [tmp1])
109
110 tmp3 = local_env.Install(local_env['libinstall'], lib)
111 env.Alias('target_install_escript_so', tmp3)
112
113 #windows specific mod
114 tmp_inst = os.path.join(local_env['pyinstall'],module_name)
115 if os.name == 'nt':
116 wrapper_postfix = '.pyd'
117 else:
118 wrapper_postfix = '.so'
119
120 share_name = os.path.join(tmp_inst,py_wrapper_name+wrapper_postfix)
121
122 tmp4 = py_wrapper_local_env.InstallAs(target=share_name,
123 source=py_wrapper_lib[0])
124
125 env.Alias('target_install_escriptcpp_so', tmp4)
126
127 # export the lib target since tests will depend on it
128 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
129 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
130 dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
131 Export('dep_lib')
132
133 # Call the python sconscript
134 env.SConscript(dirs = ['#/escript/py_src'], build_dir='py', duplicate=0)
135
136 # Call the unit tests SConscript
137 local_env.SConscript(dirs = ['#/escript/test'], build_dir='#/build/$PLATFORM/escript/test', duplicate=0)
138

  ViewVC Help
Powered by ViewVC 1.1.26