/[escript]/branches/domexper/esysUtils/src/SConscript
ViewVC logotype

Diff of /branches/domexper/esysUtils/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3250 by jfenwick, Fri Oct 1 01:53:46 2010 UTC revision 3251 by jfenwick, Thu Oct 7 04:02:30 2010 UTC
# Line 11  Line 11 
11  #  #
12  ########################################################  ########################################################
13    
   
 import os  
14  Import('*')  Import('*')
15    local_env = env_mpi.Clone()
 local_env = clone_env(env_mpi)  
16    
17  sources = """  sources = """
18      EsysAssertException.cpp      EsysAssertException.cpp
# Line 25  sources = """ Line 22  sources = """
22      esysExceptionTranslator.cpp      esysExceptionTranslator.cpp
23          blocktimer.c          blocktimer.c
24  """.split()  """.split()
25    
26  headers = """  headers = """
27      EsysAssert.h      EsysAssert.h
28      EsysAssertException.h      EsysAssertException.h
# Line 45  headers = """ Line 43  headers = """
43    
44  lib_name = 'esysUtils'  lib_name = 'esysUtils'
45    
46  if IS_WINDOWS_PLATFORM :  if IS_WINDOWS:
47    local_env.Append(CPPDEFINES = ['ESYSUTILS_EXPORTS'])      local_env.Append(CPPDEFINES = ['ESYSUTILS_EXPORTS'])
   
 if local_env['share_esysUtils'] :  
   lib = local_env.SharedLibrary(lib_name, sources)  
 else:  
   lib = local_env.StaticLibrary(lib_name, sources)  
   
 env.Alias('target_esysUtils_a', lib)  
48    
49  include_path = Dir(lib_name, local_env['incinstall'])  include_path = Dir(lib_name, local_env['incinstall'])
50    hdr_inst = local_env.Install(include_path, headers)
51    
52  tmp1 = local_env.Install(include_path, headers )  if local_env['share_esysutils']:
53  env.Alias('target_install_esysUtils_headers', [tmp1])      lib = local_env.SharedLibrary(lib_name, sources)
54    else:
55  tmp3 = local_env.Install(local_env['libinstall'], lib)      lib = local_env.StaticLibrary(lib_name, sources)
 env.Alias('target_install_esysUtils_a', tmp3)  
56    
57  # Call the unit tests SConscript  lib_inst = local_env.Install(local_env['libinstall'], lib)
 # export the lib target since tests will depend on it  
 # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)  
 # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?  
58    
59  dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]  env.Alias('build_esysUtils_lib', lib)
60  Export('dep_lib')  env.Alias('install_esysUtils_headers', hdr_inst)
61    env.Alias('install_esysUtils_lib', lib_inst)
62    
63  CallSConscript(local_env,dirs = ['#/esysUtils/test'], variant_dir='#/build/$PLATFORM/esysUtils/test', duplicate=0)  # configure the unit tests
64    local_env.SConscript(dirs=['#/esysUtils/test'], variant_dir='#/build/$PLATFORM/esysUtils/test', duplicate=0)
65    

Legend:
Removed from v.3250  
changed lines
  Added in v.3251

  ViewVC Help
Powered by ViewVC 1.1.26