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

Diff of /trunk/dataexporter/src/SConscript

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

trunk/tools/libescriptreader/src/SConscript revision 2806 by jfenwick, Mon Jul 20 06:20:06 2009 UTC trunk/dataexporter/src/SConscript revision 2810 by caltinay, Mon Dec 7 04:13:49 2009 UTC
# Line 1  Line 1 
   
1  ########################################################  ########################################################
2  #  #
3  # Copyright (c) 2003-2009 by University of Queensland  # Copyright (c) 2003-2009 by University of Queensland
# Line 15  Line 14 
14  import os  import os
15  Import('*')  Import('*')
16    
17    local_env = clone_env(env_mpi)
18    
19  sources = """  sources = """
20      escriptreader/DataVar.cpp      DataVar.cpp
21      escriptreader/ElementData.cpp      ElementData.cpp
22      escriptreader/Mesh.cpp      EscriptDataset.cpp
23      escriptreader/MeshWithElements.cpp      FinleyMesh.cpp
24      escriptreader/MPDataSet.cpp      NodeData.cpp
25  """.split()  """.split()
   
26  headers = """  headers = """
27      escriptreader/DataVar.h      DataVar.h
28      escriptreader/ElementData.h      ElementData.h
29      escriptreader/Mesh.h      EscriptDataset.h
30      escriptreader/MeshWithElements.h      escriptexport.h
31      escriptreader/MPDataSet.h      FinleyMesh.h
32      escriptreader/common.h      NodeData.h
33  """.split()  """.split()
34    
35  local_env = clone_env(env)  local_env.AppendUnique(LIBS = [ 'finley' ] + env['sys_libs'] + env['silo_libs'])
36  local_env.AppendUnique(LIBS = [env["silo_libs"]])  
37  lib = local_env.SharedLibrary("escriptreader", sources)  if IS_WINDOWS_PLATFORM :
38  env.Alias("target_escriptreader_so", lib)    local_env.Append(CPPDEFINES = ['ESCRIPTEXPORT_EXPORTS'])
39    
40  include_path = Dir("escriptreader", env["incinstall"])  module_name = 'escriptexport'
41  local_env.Install(include_path, headers)  
42  inst_lib = local_env.Install(env["libinstall"], lib)  lib = local_env.SharedLibrary(module_name, sources)
43    env.Alias('target_escriptexport_so', lib)
44  # need new environment for escript2silo to avoid dependency cycle  
45  local_env = clone_env(env)  include_path = Dir('escriptexport', local_env['incinstall'])
46  local_env.AppendUnique(LIBS = [env["silo_libs"], "escriptreader"])  
47  prog = local_env.Program("escript2silo", ["escript2silo.cpp"])  tmp1 = local_env.Install(include_path, headers)
48  env.Alias("target_escript2silo", prog)  env.Alias('target_install_escriptexport_headers', [tmp1])
49  inst_e2s = local_env.Install(local_env["bininstall"], prog)  
50  env.Alias("target_install_escript2silo", inst_e2s)  tmp3 = local_env.Install(local_env['libinstall'], lib)
51    env.Alias('target_install_escriptexport_so', tmp3)
52  # esdcreate has no other dependencies  
53  local_env = clone_env(env)  # export the lib target since tests will depend on it
54  prog = local_env.Program("esdcreate", "esdcreate.cpp")  # the lib target is a list of file nodes (why? win32 produces more than one
55  env.Alias("target_esdcreate", prog)  # output file: .lib, .dll, .pdb)
56  inst_esdcreate = local_env.Install(local_env["bininstall"], prog)  # FIXME: This list handling produces the desired result but can this be done
57  env.Alias("target_install_esdcreate", inst_esdcreate)  # directly with scons File nodes?
58    dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
59    Export('dep_lib')
60    
61    # Call the unit tests SConscript
62    #local_env.SConscript(dirs = ['#/dataexporter/test'], build_dir='#/build/$PLATFORM/dataexporter/test', duplicate=0)
63    

Legend:
Removed from v.2806  
changed lines
  Added in v.2810

  ViewVC Help
Powered by ViewVC 1.1.26