/[escript]/trunk/finley/test/MeshAdapter/SConstruct
ViewVC logotype

Contents of /trunk/finley/test/MeshAdapter/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 246 - (show annotations)
Tue Nov 29 04:27:00 2005 UTC (13 years, 8 months ago) by jgs
File size: 3165 byte(s)
allow compile options to be loaded from a config
file specified on the command line to scons

1 # Scons configuration file for finley MeshAdapter unit tests
2
3 import os
4 import sys
5
6 #
7 # ensure correct versions of python and scons
8
9 EnsurePythonVersion(2,3)
10 EnsureSConsVersion(0,96)
11
12 #
13 # set appropriate defaults for configuration variables
14
15 esysroot = Dir('#../../..')
16 usegcc = 0
17 options = None
18
19 #
20 # retreive command-line arguments if any
21
22 if ARGUMENTS.get('usegcc',0):
23 usegcc = 1
24
25 if ARGUMENTS.get('options',0):
26 options = ARGUMENTS.get('options',0)
27
28 #
29 # determine platform
30
31 env = Environment(ENV = os.environ)
32 platform = env['PLATFORM']
33
34 #
35 # determine hostname
36
37 hostname = os.environ['HOSTNAME']
38
39 #
40 # load configuration settings
41
42 options_dir = str(esysroot) + '/scons'
43 sys.path.append(options_dir)
44
45 if hostname=='ess':
46 from ess_options import *
47
48 if usegcc==1:
49 from gcc_options import *
50
51 if options!=None:
52 exec "from " + options + " import *"
53
54 cxx_flags=cxx_flags_debug
55
56 #
57 # print out build configuration for this module
58
59 print "######################################################"
60 print "Build configuration for module: MeshAdapter unit tests"
61 print " dodebug: 1"
62 print " usegcc: ", usegcc
63 print " cxx: ", cxx
64 print " platform: ", platform
65 print " hostname: ", hostname
66 print "######################################################"
67
68 #
69 # do the actual build
70
71 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
72 escript_path = str(esysroot) + '/escript/inc'
73 finley_path = str(esysroot) + '/finley/src/finley'
74 finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
75 paso_path = str(esysroot) + '/paso/inc'
76 mmio_path = str(esysroot) + '/tools/mmio/inc'
77 esysUtils_path = str(esysroot) + '/esysUtils/inc'
78 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
79
80 esys_lib_path = str(esysroot) + '/lib'
81 finley_lib_path = str(esysroot) + '/finley/lib'
82 mmio_lib_path = str(esysroot) + '/tools/mmio/lib'
83 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
84 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
85
86 cpp_path = [meshadapter_test_path,
87 escript_path,
88 finley_path,
89 finley_cppadapter_path,
90 paso_path,
91 mmio_path,
92 esysUtils_path,
93 CppUnitTest_path,
94 python_path,
95 boost_path]
96
97 lib_path = [esys_lib_path,
98 finley_lib_path,
99 mmio_lib_path,
100 esysUtils_lib_path,
101 CppUnitTest_lib_path,
102 python_lib_path,
103 boost_lib_path]
104
105 libs = ['escriptcpp',
106 'esysUtils',
107 'finleycpp',
108 'paso',
109 'mmio',
110 'CppUnitTest',
111 str(python_lib),
112 str(boost_lib),
113 'scs_mp',
114 'dl',
115 'util',
116 'guide',
117 'irc']
118
119 sources = ['MeshAdapterTestCase.cpp',
120 'MeshAdapterTest.cpp']
121
122 target = 'MeshAdapterTest.exe'
123
124 meshadapter_env = Environment(ENV = os.environ)
125
126 meshadapter_env.Replace(CXX = cxx)
127 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
128 meshadapter_env.Replace(CPPPATH = cpp_path)
129 meshadapter_env.Replace(LIBPATH = lib_path)
130 meshadapter_env.Replace(LIBS = libs)
131
132 meshadapter_test_exe = meshadapter_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26