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

Annotation of /trunk/finley/test/MeshAdapter/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

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 jgs 241 if usegcc==1:
45     from gcc_options import *
46    
47 jgs 228 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 jgs 204 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
65     escript_path = str(esysroot) + '/escript/inc'
66 jgs 205 finley_path = str(esysroot) + '/finley/src/finley'
67     finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
68 jgs 204 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 jgs 205 finley_cppadapter_path,
83 jgs 204 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 jgs 205 'finleycpp',
101 jgs 204 'paso',
102     'mmio',
103     'CppUnitTest',
104 jgs 239 str(python_lib),
105     str(boost_lib),
106 jgs 204 '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 jgs 228 meshadapter_env.Replace(CXX = cxx)
120 jgs 204 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