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

Annotation of /trunk/finley/test/MeshAdapter/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 239 - (hide annotations)
Mon Nov 28 05:49:32 2005 UTC (14 years, 4 months ago) by jgs
File size: 2978 byte(s)
read names of python and boost libraries from config file now

1 jgs 228 # Scons configuration file for finley MeshAdapter unit tests
2 jgs 204
3     import os
4 jgs 228 import sys
5 jgs 204
6 jgs 228 #
7     # ensure correct versions of python and scons
8 jgs 204
9 jgs 228 EnsurePythonVersion(2,3)
10     EnsureSConsVersion(0,96)
11 jgs 204
12 jgs 228 #
13     # set appropriate defaults for configuration variables
14 jgs 204
15 jgs 228 esysroot = Dir('#../../..')
16     usegcc = 0
17 jgs 204
18 jgs 228 #
19     # retreive command-line arguments if any
20 jgs 204
21 jgs 228 if ARGUMENTS.get('usegcc',0):
22     usegcc = 1
23 jgs 204
24 jgs 228 #
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     cxx_flags=cxx_flags_debug
45    
46     #
47     # print out build configuration for this module
48    
49     print "######################################################"
50     print "Build configuration for module: MeshAdapter unit tests"
51     print " dodebug: 1"
52     print " usegcc: ", usegcc
53     print " cxx: ", cxx
54     print " platform: ", platform
55     print " hostname: ", hostname
56     print "######################################################"
57    
58     #
59     # do the actual build
60    
61 jgs 204 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
62     escript_path = str(esysroot) + '/escript/inc'
63 jgs 205 finley_path = str(esysroot) + '/finley/src/finley'
64     finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
65 jgs 204 paso_path = str(esysroot) + '/paso/inc'
66     mmio_path = str(esysroot) + '/tools/mmio/inc'
67     esysUtils_path = str(esysroot) + '/esysUtils/inc'
68     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
69    
70     esys_lib_path = str(esysroot) + '/lib'
71     finley_lib_path = str(esysroot) + '/finley/lib'
72     mmio_lib_path = str(esysroot) + '/tools/mmio/lib'
73     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
74     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
75    
76     cpp_path = [meshadapter_test_path,
77     escript_path,
78     finley_path,
79 jgs 205 finley_cppadapter_path,
80 jgs 204 paso_path,
81     mmio_path,
82     esysUtils_path,
83     CppUnitTest_path,
84     python_path,
85     boost_path]
86    
87     lib_path = [esys_lib_path,
88     finley_lib_path,
89     mmio_lib_path,
90     esysUtils_lib_path,
91     CppUnitTest_lib_path,
92     python_lib_path,
93     boost_lib_path]
94    
95     libs = ['escriptcpp',
96     'esysUtils',
97 jgs 205 'finleycpp',
98 jgs 204 'paso',
99     'mmio',
100     'CppUnitTest',
101 jgs 239 str(python_lib),
102     str(boost_lib),
103 jgs 204 'scs_mp',
104     'dl',
105     'util',
106     'guide',
107     'irc']
108    
109     sources = ['MeshAdapterTestCase.cpp',
110     'MeshAdapterTest.cpp']
111    
112     target = 'MeshAdapterTest.exe'
113    
114     meshadapter_env = Environment(ENV = os.environ)
115    
116 jgs 228 meshadapter_env.Replace(CXX = cxx)
117 jgs 204 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
118     meshadapter_env.Replace(CPPPATH = cpp_path)
119     meshadapter_env.Replace(LIBPATH = lib_path)
120     meshadapter_env.Replace(LIBS = libs)
121    
122     meshadapter_test_exe = meshadapter_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26