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

Contents of /trunk/esysUtils/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4035 - (show annotations)
Thu Oct 25 03:10:14 2012 UTC (6 years, 9 months ago) by caltinay
File size: 1572 byte(s)
Tweaked scons files so tests work even when specifying non-absolute build_dir.

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2012 by University of Queensland
5 # http://www.uq.edu.au
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 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 Import('*')
17 local_env = env.Clone()
18
19 sources = """
20 EsysAssertException.cpp
21 EsysException.cpp
22 Esys_MPI.c
23 error.c
24 esysExceptionTranslator.cpp
25 blocktimer.c
26 """.split()
27
28 headers = """
29 EsysAssert.h
30 EsysAssertException.h
31 EsysException.h
32 EsysTypes.h
33 Esys_MPI.h
34 error.h
35 esys_malloc.h
36 esysExceptionTranslator.h
37 blocktimer.h
38 mem.h
39 mpi_C.h
40 index.h
41 maths.h
42 system_dep.h
43 types.h
44 """.split()
45
46 lib_name = 'esysUtils'
47
48 if IS_WINDOWS:
49 local_env.Append(CPPDEFINES = ['ESYSUTILS_EXPORTS'])
50
51 include_path = Dir(lib_name, local_env['incinstall'])
52 hdr_inst = local_env.Install(include_path, headers)
53
54 if local_env['build_shared']:
55 lib = local_env.SharedLibrary(lib_name, sources)
56 else:
57 lib = local_env.StaticLibrary(lib_name, sources)
58
59 lib_inst = local_env.Install(local_env['libinstall'], lib)
60
61 env.Alias('build_esysUtils_lib', lib)
62 env.Alias('install_esysUtils_headers', hdr_inst)
63 env.Alias('install_esysUtils_lib', lib_inst)
64
65 # configure the unit tests
66 local_env.SConscript(dirs=['#/esysUtils/test'], variant_dir='test', duplicate=0)
67

  ViewVC Help
Powered by ViewVC 1.1.26