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

Contents of /trunk/weipa/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6184 - (show annotations)
Wed Apr 27 01:30:57 2016 UTC (2 years, 11 months ago) by caltinay
File size: 3703 byte(s)
more fixes to weipa readerlib build

1 ##############################################################################
2 #
3 # Copyright (c) 2003-2016 by The University of Queensland
4 # http://www.uq.edu.au
5 #
6 # Primary Business: Queensland, Australia
7 # Licensed under the Apache License, version 2.0
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11 # Development 2012-2013 by School of Earth Sciences
12 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
13 #
14 ##############################################################################
15
16 Import('*')
17
18 module_name = 'weipa'
19
20 sources = """
21 DataVar.cpp
22 EscriptDataset.cpp
23 """.split()
24
25 headers = """
26 DataVar.h
27 DomainChunk.h
28 ElementData.h
29 EscriptDataset.h
30 NodeData.h
31 VisItControl.h
32 vtkCellType.h
33 weipa.h
34 """.split()
35
36 local_env = env.Clone()
37
38 # collect dependencies for other modules
39 weipalibs = []
40 weipalibs += env['escript_libs']
41
42 if 'dudley' in env['domains'] or 'finley' in env['domains']:
43 sources += ['FinleyDomain.cpp','FinleyElements.cpp','FinleyNodes.cpp']
44 headers += ['FinleyDomain.h','FinleyElements.h','FinleyNodes.h']
45 if 'dudley' in env['domains']:
46 local_env.Append(CPPDEFINES = ['USE_DUDLEY'])
47 weipalibs += env['dudley_libs']
48 if 'finley' in env['domains']:
49 local_env.Append(CPPDEFINES = ['USE_FINLEY'])
50 weipalibs += env['finley_libs']
51
52 if local_env['silo']:
53 weipalibs += env['silo_libs']
54
55 pluginlibs = [] + weipalibs
56 pluginsources = [] + sources
57 # clone here to use same CPPDEFINES
58 visitplugin_env = local_env.Clone()
59
60 if 'ripley' in env['domains']:
61 sources += ['RipleyDomain.cpp','RipleyElements.cpp','RipleyNodes.cpp']
62 headers += ['RipleyDomain.h','RipleyElements.h','RipleyNodes.h']
63 local_env.Append(CPPDEFINES = ['USE_RIPLEY'])
64 weipalibs += env['ripley_libs']
65
66 if 'speckley' in env['domains']:
67 sources += ['SpeckleyDomain.cpp','SpeckleyElements.cpp','SpeckleyNodes.cpp']
68 headers += ['SpeckleyDomain.h','SpeckleyElements.h','SpeckleyNodes.h']
69 local_env.Append(CPPDEFINES = ['USE_SPECKLEY'])
70 weipalibs += env['speckley_libs']
71
72 sources.append(['VisItControl.cpp'])
73
74 if local_env['visit']:
75 sources.append(['VisItData.cpp'])
76 headers.append(['VisItData.h'])
77 local_env.Append(CPPDEFINES = ['USE_VISIT'])
78 weipalibs += ['simV2']
79
80 local_env.PrependUnique(LIBS = weipalibs)
81 env['weipa_libs'] = [module_name] + weipalibs
82
83 if IS_WINDOWS:
84 local_env.Append(CPPDEFINES = ['WEIPA_EXPORTS'])
85
86 include_path = Dir(module_name, local_env['incinstall'])
87 hdr_inst = local_env.Install(include_path, headers)
88
89 lib = local_env.SharedLibrary(module_name, sources)
90 lib_inst = local_env.Install(local_env['libinstall'], lib)
91
92 ### Python wrapper ###
93 py_env = local_env.Clone()
94 py_env.PrependUnique(LIBS = [module_name])
95 py_lib_name = module_name + 'cpp'
96 py_lib = py_env.PythonModule(py_lib_name, 'weipacpp.cpp')
97
98 mod_path = Dir(module_name, local_env['pyinstall'])
99 mod_inst = py_env.Install(mod_path, py_lib)
100
101 build = env.Alias('build_weipa', [hdr_inst, lib, py_lib])
102 env.Alias('install_weipa', [build, lib_inst, mod_inst])
103
104 ######################
105 ### Plugin library ###
106 ######################
107 if 'dudley' in env['domains'] or 'finley' in env['domains']:
108 visitplugin_env.PrependUnique(LIBS = pluginlibs)
109 visitplugin_env.Append(CPPDEFINES = ['VISIT_PLUGIN'])
110 visitplugin_env['OBJPREFIX']='reader_'
111
112 plugin_lib = visitplugin_env.SharedLibrary('escriptreader', pluginsources)
113 plugin_inst = local_env.Install(local_env['libinstall'], plugin_lib)
114
115 build = env.Alias('build_escriptreader', plugin_lib)
116 env.Alias('install_escriptreader', [build, plugin_inst])
117

  ViewVC Help
Powered by ViewVC 1.1.26