/[escript]/branches/scons-dev/esysUtils/src/SConscript
ViewVC logotype

Contents of /branches/scons-dev/esysUtils/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1641 - (show annotations)
Tue Jul 15 00:23:45 2008 UTC (11 years, 10 months ago) by ksteube
File size: 1125 byte(s)
New SConstruct uses Configure() to determine which libraries/headers
are available.

Now using targets for each library instead of a target for the lib
directory...this gives better control over what gets built.

Source files are explicitly listed instead of discovered using glob.

This is not ready for use just yet.

1 import os
2 Import('*')
3
4 local_env=env_mpi.Copy()
5
6 sources = """
7 EsysAssertException.cpp
8 EsysException.cpp
9 esysExceptionTranslator.cpp
10 """.split()
11 headers = """
12 EsysAssert.h
13 EsysAssertException.h
14 EsysException.h
15 EsysTypes.h
16 esys_malloc.h
17 esysExceptionTranslator.h
18 system_dep.h
19 """.split()
20
21 lib_name = 'esysUtils'
22
23 lib = local_env.StaticLibrary(lib_name, sources)
24 env.Alias('target_esysUtils_a', lib)
25
26 include_path = Dir(lib_name, incinstall)
27
28 tmp1 = local_env.Install(include_path, headers )
29 env.Alias('target_install_esysUtils_headers', [tmp1])
30
31 tmp3 = local_env.Install(libinstall, lib)
32 env.Alias('target_install_esysUtils_a', tmp3)
33
34 # Call the unit tests SConscript
35 # export the lib target since tests will depend on it
36 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
37 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
38
39 dep_lib = [libinstall+'/'+str(x) for x in lib]
40 Export('dep_lib')
41
42 local_env.SConscript(dirs = ['#/esysUtils/test'], build_dir='#/build/$PLATFORM/esysUtils/test', duplicate=0)
43

  ViewVC Help
Powered by ViewVC 1.1.26