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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations)
Mon Nov 28 06:14:47 2005 UTC (14 years, 4 months ago) by jgs
File size: 3021 byte(s)
if usegcc=1 is set on command line, load compiler options
fropm scons/gcc_options.py

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

  ViewVC Help
Powered by ViewVC 1.1.26