/[escript]/trunk-mpi-branch/SConstruct
ViewVC logotype

Annotation of /trunk-mpi-branch/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1011 - (hide annotations)
Tue Mar 6 04:41:55 2007 UTC (12 years, 6 months ago) by gross
File size: 20243 byte(s)
it seems to compile now but linking is still not working
1 jongui 961 # Copyright 2006 by ACcESS MNRF
2 jgs 214 #
3 matt 863 # http://www.access.edu.au
4     # Primary Business: Queensland, Australia
5     # Licensed under the Open Software License version 3.0
6     # http://www.opensource.org/licenses/osl-3.0.php
7 elspeth 643 #
8 matt 863 #
9     #
10 jgs 455
11 robwdcock 682 # top-level Scons configuration file for all esys13 modules
12     # Begin initialisation Section
13 matt 863 # all of this section just intialises default environments and helper
14 robwdcock 682 # scripts. You shouldn't need to modify this section.
15     EnsureSConsVersion(0,96,91)
16     EnsurePythonVersion(2,3)
17 jgs 214
18 gross 700 # import tools:
19     import glob
20 robwdcock 682 import sys, os
21 matt 863 import socket
22 robwdcock 682 # Add our extensions
23     if sys.path.count('scons')==0: sys.path.append('scons')
24     import scons_extensions
25 jgs 192
26 gross 805 # check if UMFPACK is installed on the system:
27 gross 806 if os.path.isdir('/opt/UMFPACK/Include') and os.path.isdir('/opt/UMFPACK/Lib'):
28 gross 805 umf_path_default='/opt/UMFPACK/Include'
29     umf_lib_path_default='/opt/UMFPACK/Lib'
30 gross 806 umf_libs_default=['umfpack']
31 gross 805 else:
32     umf_path_default=None
33     umf_lib_path_default=None
34 gross 1011 umf_libs_default=[]
35 gross 806
36     if os.path.isdir('/opt/AMD/Include') and os.path.isdir('/opt/AMD/Lib'):
37     amd_path_default='/opt/AMD/Include'
38     amd_lib_path_default='/opt/AMD/Lib'
39     amd_libs_default=['amd']
40 gross 805 else:
41 gross 806 amd_path_default=None
42     amd_lib_path_default=None
43 gross 1011 amd_libs_default=[]
44 gross 806
45     if os.path.isdir('/opt/UFconfig'):
46     ufc_path_default='/opt/UFconfig'
47     else:
48     ufc_path_default=None
49    
50 robwdcock 682 # Default options and options help text
51     # These are defaults and can be overridden using command line arguments or an options file.
52     # if the options_file or ARGUMENTS do not exist then the ones listed as default here are used
53     # DO NOT CHANGE THEM HERE
54     if ARGUMENTS.get('options_file',0):
55     options_file = ARGUMENTS.get('options_file',0)
56     else:
57     from string import ascii_letters,digits
58     hostname=""
59     for s in socket.gethostname().split('.')[0]:
60     if s in ascii_letters+digits:
61     hostname+=s
62     else:
63     hostname+="_"
64     options_file = "scons/"+hostname+"_options.py"
65 jgs 214
66 robwdcock 682 opts = Options(options_file, ARGUMENTS)
67     opts.AddOptions(
68     # Where to install esys stuff
69 matt 863 ('incinstall', 'where the esys headers will be installed', Dir('#.').abspath+'/include'),
70     ('libinstall', 'where the esys libraries will be installed', Dir('#.').abspath+'/lib'),
71     ('pyinstall', 'where the esys python modules will be installed', Dir('#.').abspath),
72     ('src_zipfile', 'the source zip file will be installed.', Dir('#.').abspath+"/release/escript_src.zip"),
73     ('test_zipfile', 'the test zip file will be installed.', Dir('#.').abspath+"/release/escript_tests.zip"),
74     ('src_tarfile', 'the source tar file will be installed.', Dir('#.').abspath+"/release/escript_src.tar.gz"),
75     ('test_tarfile', 'the test tar file will be installed.', Dir('#.').abspath+"/release/escript_tests.tar.gz"),
76     ('examples_tarfile', 'the examples tar file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),
77     ('examples_zipfile', 'the examples zip file will be installed.', Dir('#.').abspath+"/release/doc/escript_examples.zip"),
78     ('guide_pdf', 'name of the user guide in pdf format', Dir('#.').abspath+"/release/doc/user/guide.pdf"),
79     ('api_epydoc', 'name of the epydoc api docs directory',Dir('#.').abspath+"/release/doc/epydoc"),
80     ('guide_html', 'name of the directory for user guide in html format', Dir('#.').abspath+"/release/doc/user/html"),
81 robwdcock 682 # Compilation options
82 gross 700 BoolOption('dodebug', 'Do you want a debug build?', 'no'),
83 robwdcock 682 ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file),
84     ('cc_defines','C/C++ defines to use', None),
85 gross 700 ('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas'),
86     ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'),
87     ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),
88     ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),
89 robwdcock 682 ('ar_flags', 'Static library archiver flags to use', None),
90     ('sys_libs', 'System libraries to link with', None),
91 gross 700 ('tar_flags','flags for zip files','-c -z'),
92 robwdcock 682 # MKL
93 matt 863 PathOption('mkl_path', 'Path to MKL includes', None),
94     PathOption('mkl_lib_path', 'Path to MKL libs', None),
95 robwdcock 682 ('mkl_libs', 'MKL libraries to link with', None),
96 gross 1011 # TRILINOS
97     PathOption('trilinos_path', 'Path to TRILINOS includes', None),
98     PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),
99     ('trilinos_libs', 'TRILINOS libraries to link with', None),
100 robwdcock 682 # SCSL
101 matt 863 PathOption('scsl_path', 'Path to SCSL includes', None),
102     PathOption('scsl_lib_path', 'Path to SCSL libs', None),
103 robwdcock 682 ('scsl_libs', 'SCSL libraries to link with', None),
104 matt 863 # UMFPACK
105     PathOption('ufc_path', 'Path to UFconfig includes', ufc_path_default),
106     PathOption('umf_path', 'Path to UMFPACK includes', umf_path_default),
107     PathOption('umf_lib_path', 'Path to UMFPACK libs', umf_lib_path_default),
108 gross 806 ('umf_libs', 'UMFPACK libraries to link with', umf_libs_default),
109     # AMD (used by UMFPACK)
110 matt 863 PathOption('amd_path', 'Path to AMD includes', amd_path_default),
111     PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
112 gross 806 ('amd_libs', 'AMD libraries to link with', amd_libs_default),
113 gross 805 # BLAS
114 matt 863 PathOption('blas_path', 'Path to BLAS includes', None),
115     PathOption('blas_lib_path', 'Path to BLAS libs', None),
116 gross 806 ('blas_libs', 'BLAS libraries to link with', None),
117 gross 950 # netCDF
118 gross 965 PathOption('netCDF_path', 'Path to netCDF includes', '/usr/local/include'),
119     PathOption('netCDF_lib_path', 'Path to netCDF libs', '/usr/local/lib'),
120 gross 950 ('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ),
121 robwdcock 682 # Python
122 gross 685 # locations of include files for python
123 matt 863 PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])),
124     PathOption('python_lib_path', 'Path to Python libs', '/usr/lib'),
125 gross 1011 ('python_libs', 'Python libraries to link with', ["python%s.%s"%(sys.version_info[0],sys.version_info[1]),]),
126 robwdcock 682 # Boost
127 matt 863 PathOption('boost_path', 'Path to Boost includes', '/usr/include'),
128     PathOption('boost_lib_path', 'Path to Boost libs', '/usr/lib'),
129 gross 1011 ('boost_libs', 'Boost libraries to link with', ['boost_python',]),
130 robwdcock 682 # Doc building
131 matt 863 # PathOption('doxygen_path', 'Path to Doxygen executable', None),
132     # PathOption('epydoc_path', 'Path to Epydoc executable', None),
133 robwdcock 682 # PAPI
134 matt 863 PathOption('papi_path', 'Path to PAPI includes', None),
135     PathOption('papi_lib_path', 'Path to PAPI libs', None),
136 robwdcock 682 ('papi_libs', 'PAPI libraries to link with', None),
137 bcumming 759 # MPI
138     BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
139 gross 1007 PathOption('mpi_path', 'Path to MPI includes', '/usr/include'),
140     PathOption('mpi_lib_path', 'Path to MPI libs','/usr/lib'),
141     ('mpi_libs', 'MPI libraries to link with', [ 'a', 'b' ]),
142 robwdcock 682 )
143    
144     # Initialise Scons Build Environment
145     # check for user environment variables we are interested in
146     try:
147     python_path = os.environ['PYTHONPATH']
148     except KeyError:
149     python_path = ''
150     try:
151     path = os.environ['PATH']
152     except KeyError:
153     path = ''
154     try:
155     ld_library_path = os.environ['LD_LIBRARY_PATH']
156     except KeyError:
157     ld_library_path = ''
158    
159     # Note: On the Altix the intel compilers are not automatically
160     # detected by scons intelc.py script. The Altix has a different directory
161     # path and in some locations the "modules" facility is used to support
162     # multiple compiler versions. This forces the need to import the users PATH
163     # environment which isn't the "scons way"
164     # This doesn't impact linux and windows which will use the default compiler (g++ or msvc, or the intel compiler if it is installed on both platforms)
165     # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
166 matt 863
167 robwdcock 682 if os.name != "nt" and os.uname()[4]=='ia64':
168 robwdcock 688 env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)
169 robwdcock 684 env['ENV']['PATH'] = path
170     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
171     env['ENV']['PYTHONPATH'] = python_path
172 robwdcock 682 if env['CXX'] == 'icpc':
173     env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py
174     elif os.name == "nt":
175 robwdcock 684 env = Environment(tools = ['default', 'intelc'], options = opts)
176     env['ENV']['PYTHONPATH'] = python_path
177 robwdcock 682 else:
178 robwdcock 684 env = Environment(tools = ['default'], options = opts)
179     env['ENV']['PATH'] = path
180     env['ENV']['LD_LIBRARY_PATH'] = ld_library_path
181     env['ENV']['PYTHONPATH'] = python_path
182 robwdcock 682
183     # Setup help for options
184     Help(opts.GenerateHelpText(env))
185    
186     # Add some customer builders
187     py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)
188     env.Append(BUILDERS = {'PyCompile' : py_builder});
189    
190     if env['PLATFORM'] == "win32":
191     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix='.exe', single_source=True)
192     else:
193     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
194     env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
195    
196     runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True)
197     env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder});
198    
199     # Convert the options which are held in environment variable into python variables for ease of handling and configure compilation options
200     try:
201     incinstall = env['incinstall']
202     env.Append(CPPPATH = [incinstall,])
203     except KeyError:
204 matt 863 incinstall = None
205 robwdcock 682 try:
206     libinstall = env['libinstall']
207     env.Append(LIBPATH = [libinstall,])
208     env.PrependENVPath('LD_LIBRARY_PATH', libinstall)
209 woo409 757 if env['PLATFORM'] == "win32":
210     env.PrependENVPath('PATH', libinstall)
211     env.PrependENVPath('PATH', env['boost_lib_path'])
212 robwdcock 682 except KeyError:
213 matt 863 libinstall = None
214 robwdcock 682 try:
215     pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc
216     env.PrependENVPath('PYTHONPATH', env['pyinstall'])
217     except KeyError:
218 matt 863 pyinstall = None
219 robwdcock 682 try:
220     dodebug = env['dodebug']
221     except KeyError:
222 matt 863 dodebug = None
223 robwdcock 682 try:
224 bcumming 759 useMPI = env['useMPI']
225     except KeyError:
226 matt 863 useMPI = None
227 bcumming 759 try:
228 robwdcock 682 cc_defines = env['cc_defines']
229 woo409 757 env.Append(CPPDEFINES = cc_defines)
230 robwdcock 682 except KeyError:
231     pass
232 ksteube 817
233     if 'shake71' == socket.gethostname().split('.')[0]:
234     if useMPI:
235     env['CC'] = 'mpicc'
236     env['CXX'] = 'mpiCC'
237    
238 gross 1011 # mpi?
239     if useMPI:
240     env.Append(CPPDEFINES=['PASO_MPI',])
241     env.Append(CDEFINES=['PASO_MPI',])
242    
243 robwdcock 682 if dodebug:
244 bcumming 759 try:
245 robwdcock 682 flags = env['cc_flags_debug']
246     env.Append(CCFLAGS = flags)
247 bcumming 759 except KeyError:
248 robwdcock 682 pass
249     else:
250     try:
251     flags = env['cc_flags']
252     env.Append(CCFLAGS = flags)
253     except KeyError:
254     pass
255     if dodebug:
256 bcumming 759 try:
257     flags = env['cxx_flags_debug']
258     env.Append(CXXFLAGS = flags)
259     except KeyError:
260     pass
261 robwdcock 682 else:
262 bcumming 759 try:
263     flags = env['cxx_flags']
264     env.Append(CXXFLAGS = flags)
265     except KeyError:
266     pass
267 robwdcock 682 try:
268     flags = env['ar_flags']
269     env.Append(ARFLAGS = flags)
270     except KeyError:
271 matt 863 ar_flags = None
272 robwdcock 682 try:
273     sys_libs = env['sys_libs']
274     except KeyError:
275 matt 863 sys_libs = ''
276 robwdcock 682
277     try:
278 gross 700 tar_flags = env['tar_flags']
279     env.Replace(TARFLAGS = tar_flags)
280     except KeyError:
281     pass
282    
283    
284 gross 1011 # ============= set mkl (but only of no MPI) =====================================
285     if not useMPI:
286     try:
287     includes = env['mkl_path']
288     env.Append(CPPPATH = [includes,])
289     except KeyError:
290     pass
291 gross 700
292 gross 806 try:
293 gross 1011 lib_path = env['mkl_lib_path']
294     env.Append(LIBPATH = [lib_path,])
295     except KeyError:
296     pass
297    
298     try:
299 gross 806 mkl_libs = env['mkl_libs']
300     except KeyError:
301 gross 1011 mkl_libs = []
302     else:
303     mkl_libs = []
304 gross 806
305 gross 1011 # ============= set scsl (but only of no MPI) =====================================
306     if not useMPI:
307     try:
308     includes = env['scsl_path']
309     env.Append(CPPPATH = [includes,])
310     except KeyError:
311     pass
312 gross 806
313 gross 1011 try:
314     lib_path = env['scsl_lib_path']
315     env.Append(LIBPATH = [lib_path,])
316     except KeyError:
317     pass
318    
319     try:
320     scsl_libs = env['scsl_libs']
321     except KeyError:
322     scsl_libs = [ ]
323 gross 806
324 matt 863 else:
325 gross 1011 scsl_libs = []
326 gross 805
327 gross 1011 # ============= set TRILINOS (but only with MPI) =====================================
328     if useMPI:
329     try:
330     includes = env['trilinos_path']
331     env.Append(CPPPATH = [includes,])
332     except KeyError:
333     pass
334 gross 805
335 gross 1011 try:
336     lib_path = env['trilinos_lib_path']
337     env.Append(LIBPATH = [lib_path,])
338     except KeyError:
339     pass
340 gross 805
341 gross 1011 try:
342     trilinos_libs = env['trilinos_libs']
343     except KeyError:
344     trilinos_libs = []
345 gross 806 else:
346 gross 1011 trilinos_libs = []
347    
348    
349     # ============= set umfpack (but only without MPI) =====================================
350     umfpack_libs=[ ]
351     if not useMPI:
352 gross 806 try:
353 gross 1011 includes = env['umf_path']
354     env.Append(CPPPATH = [includes,])
355     except KeyError:
356     pass
357    
358     try:
359     lib_path = env['umf_lib_path']
360     env.Append(LIBPATH = [lib_path,])
361     except KeyError:
362     pass
363    
364     try:
365 gross 806 umf_libs = env['umf_libs']
366 gross 1011 umfpack_libs+=umf_libs
367 gross 806 except KeyError:
368 gross 1011 pass
369 gross 806
370 gross 1011 try:
371     includes = env['ufc_path']
372     env.Append(CPPPATH = [includes,])
373     except KeyError:
374     pass
375 gross 805
376 gross 1011 try:
377     includes = env['amd_path']
378     env.Append(CPPPATH = [includes,])
379     except KeyError:
380     pass
381 gross 805
382 gross 1011 try:
383     lib_path = env['amd_lib_path']
384     env.Append(LIBPATH = [lib_path,])
385     except KeyError:
386     pass
387 gross 806
388     try:
389     amd_libs = env['amd_libs']
390 gross 1011 umfpack_libs+=amd_libs
391 gross 806 except KeyError:
392 gross 1011 pass
393 gross 806
394 gross 1011 # ============= set blas =====================================
395 gross 806 try:
396 gross 805 includes = env['blas_path']
397     env.Append(CPPPATH = [includes,])
398     except KeyError:
399     pass
400 gross 806
401 gross 805 try:
402     lib_path = env['blas_lib_path']
403     env.Append(LIBPATH = [lib_path,])
404     except KeyError:
405     pass
406 gross 806
407 gross 805 try:
408     blas_libs = env['blas_libs']
409     except KeyError:
410 gross 1011 blas_libs = [ ]
411 gross 805
412 gross 1011 # ============= set netcdf =====================================
413 gross 805 try:
414 gross 950 includes = env['netCDF_path']
415     env.Append(CPPPATH = [includes,])
416     except KeyError:
417     pass
418    
419     try:
420     lib_path = env['netCDF_lib_path']
421     env.Append(LIBPATH = [lib_path,])
422     except KeyError:
423     pass
424    
425     try:
426     netCDF_libs_cxx = env['netCDF_libs_cxx']
427     except KeyError:
428     netCDF_lib_cxx = [ ]
429    
430 gross 1011 # ============= set boost =====================================
431 gross 950 try:
432 robwdcock 682 includes = env['boost_path']
433     env.Append(CPPPATH = [includes,])
434     except KeyError:
435     pass
436     try:
437     lib_path = env['boost_lib_path']
438     env.Append(LIBPATH = [lib_path,])
439     except KeyError:
440     pass
441     try:
442 gross 1011 boost_libs = env['boost_libs']
443 robwdcock 682 except KeyError:
444 gross 1011 boost_libs = [ ]
445     # ============= set python =====================================
446 robwdcock 682 try:
447     includes = env['python_path']
448     env.Append(CPPPATH = [includes,])
449     except KeyError:
450     pass
451     try:
452     lib_path = env['python_lib_path']
453     env.Append(LIBPATH = [lib_path,])
454     except KeyError:
455     pass
456     try:
457 gross 1011 python_libs = env['python_lib']
458 robwdcock 682 except KeyError:
459 gross 1011 python_libs = []
460    
461     # ============= set mpi =====================================
462     if useMPI:
463     try:
464     includes = env['mpi_path']
465     env.Append(CPPPATH = [includes,])
466     except KeyError:
467     pass
468     try:
469     lib_path = env['mpi_lib_path']
470     env.Append(LIBPATH = [lib_path,])
471     except KeyError:
472     pass
473     try:
474     mpi_libs = env['mpi_libs']
475     except KeyError:
476     mpi_libs = []
477     else:
478     mpi_libs=[]
479     # ============= set papi =====================================
480 robwdcock 682 try:
481     includes = env['papi_path']
482     env.Append(CPPPATH = [includes,])
483     except KeyError:
484     pass
485     try:
486     lib_path = env['papi_lib_path']
487     env.Append(LIBPATH = [lib_path,])
488     except KeyError:
489     pass
490     try:
491     papi_libs = env['papi_libs']
492     except KeyError:
493 matt 863 papi_libs = None
494 robwdcock 682
495 gross 707
496 gross 1011 # ============= and some helpers =====================================
497 gross 700 try:
498 gross 1011 doxygen_path = env['doxygen_path']
499     except KeyError:
500     doxygen_path = None
501     try:
502     epydoc_path = env['epydoc_path']
503     except KeyError:
504     epydoc_path = None
505     try:
506 gross 707 src_zipfile = env.File(env['src_zipfile'])
507 gross 700 except KeyError:
508 matt 863 src_zipfile = None
509 gross 700 try:
510 gross 707 test_zipfile = env.File(env['test_zipfile'])
511 gross 700 except KeyError:
512 matt 863 test_zipfile = None
513 gross 707 try:
514     examples_zipfile = env.File(env['examples_zipfile'])
515     except KeyError:
516 matt 863 examples_zipfile = None
517 gross 700
518     try:
519 gross 707 src_tarfile = env.File(env['src_tarfile'])
520 gross 700 except KeyError:
521 matt 863 src_tarfile = None
522 gross 700 try:
523 gross 707 test_tarfile = env.File(env['test_tarfile'])
524 gross 700 except KeyError:
525 matt 863 test_tarfile = None
526 gross 707 try:
527     examples_tarfile = env.File(env['examples_tarfile'])
528     except KeyError:
529 matt 863 examples_tarfile = None
530 gross 700
531     try:
532 gross 707 guide_pdf = env.File(env['guide_pdf'])
533 gross 700 except KeyError:
534 matt 863 guide_pdf = None
535 gross 700
536 gross 707 try:
537     guide_html_index = env.File('index.htm',env['guide_html'])
538     except KeyError:
539 matt 863 guide_html_index = None
540 gross 707
541 elspeth 712 try:
542     api_epydoc = env.Dir(env['api_epydoc'])
543     except KeyError:
544 matt 863 api_epydoc = None
545 elspeth 712
546 gross 1011
547    
548 gross 700 # Zipgets
549 matt 863
550 robwdcock 682 env.Default(libinstall)
551     env.Default(incinstall)
552     env.Default(pyinstall)
553 matt 863 env.Alias('release_src',[ src_zipfile, src_tarfile ])
554 gross 700 env.Alias('release_tests',[ test_zipfile, test_tarfile])
555 gross 707 env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
556 gross 720 env.Alias('api_epydoc',api_epydoc)
557 gross 807 env.Alias('guide_pdf', guide_pdf)
558     env.Alias('docs',[ 'release_examples', 'guide_pdf', guide_html_index, api_epydoc])
559 gross 707 env.Alias('release', ['release_src', 'release_tests', 'docs'])
560 gross 705 env.Alias('build_tests') # target to build all C++ tests
561     env.Alias('build_py_tests') # target to build all python tests
562 gross 706 env.Alias('build_all_tests', [ 'build_tests', 'build_py_tests' ] ) # target to build all python tests
563     env.Alias('run_tests', 'build_tests') # target to run all C++ test
564     env.Alias('py_tests', 'build_py_tests') # taget to run all released python tests
565 gross 705 env.Alias('all_tests', ['run_tests', 'py_tests']) # target to run all C++ and released python tests
566 robwdcock 682
567     # Python install - esys __init__.py
568 woo409 757 init_target = env.Command(pyinstall+'/__init__.py', None, Touch('$TARGET'))
569     env.Alias(init_target)
570 robwdcock 682
571     # Allow sconscripts to see the env
572 gross 1011 Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umfpack_libs",
573     "blas_libs", "netCDF_libs_cxx", "trilinos_libs", "mpi_libs",
574     "boost_libs", "python_libs", "doxygen_path", "epydoc_path", "papi_libs",
575 gross 707 "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
576 bcumming 759 "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])
577 robwdcock 682
578     # End initialisation section
579     # Begin configuration section
580 gross 700 # adds this file and the scons option directore to the source tar
581     release_srcfiles=[env.File('SConstruct'),]+[ env.File(x) for x in glob.glob('scons/*.py') ]
582     release_testfiles=[env.File('README_TESTS'),]
583 gross 706 env.Zip(src_zipfile, release_srcfiles)
584 gross 700 env.Zip(test_zipfile, release_testfiles)
585     env.Tar(src_tarfile, release_srcfiles)
586     env.Tar(test_tarfile, release_testfiles)
587    
588 robwdcock 682 # Insert new components to be build here
589     # FIXME: might be nice to replace this verbosity with a list of targets and some
590     # FIXME: nifty python to create the lengthy but very similar env.Sconscript lines
591     # Third Party libraries
592     env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
593     # C/C++ Libraries
594     env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
595 gross 958 # bruce is removed for now as it doesn't really do anything
596     # env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)
597 robwdcock 682 env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)
598     env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
599     env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
600     env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)
601 gross 707 env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)
602 matt 863 env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)
603 gross 898 env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)
604 bcumming 751
605     # added by Ben Cumming
606 matt 863 env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)
607 bcumming 784 #env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26