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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1641 - (hide 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 gross 700 import os
2 jgs 180 Import('*')
3    
4 ksteube 1641 local_env=env_mpi.Copy()
5 robwdcock 682
6 ksteube 1641 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 robwdcock 682
21     lib_name = 'esysUtils'
22 jgs 180
23 robwdcock 682 lib = local_env.StaticLibrary(lib_name, sources)
24 ksteube 1641 env.Alias('target_esysUtils_a', lib)
25 jgs 468
26 robwdcock 682 include_path = Dir(lib_name, incinstall)
27 jgs 180
28 ksteube 1641 tmp1 = local_env.Install(include_path, headers )
29     env.Alias('target_install_esysUtils_headers', [tmp1])
30 jgs 180
31 ksteube 1641 tmp3 = local_env.Install(libinstall, lib)
32     env.Alias('target_install_esysUtils_a', tmp3)
33    
34 robwdcock 682 # 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 jgs 180
39 robwdcock 682 dep_lib = [libinstall+'/'+str(x) for x in lib]
40     Export('dep_lib')
41 jgs 352
42 gross 700 local_env.SConscript(dirs = ['#/esysUtils/test'], build_dir='#/build/$PLATFORM/esysUtils/test', duplicate=0)
43 robwdcock 682

  ViewVC Help
Powered by ViewVC 1.1.26