/[escript]/trunk/escript/test/DataBlocks2D/SConstruct
ViewVC logotype

Annotation of /trunk/escript/test/DataBlocks2D/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 235 # Scons configuration file for DataBlocks2D unit tests
2 jgs 196
3     import os
4 jgs 235 import sys
5 jgs 196
6 jgs 235 #
7     # ensure correct versions of python and scons
8 jgs 196
9 jgs 235 EnsurePythonVersion(2,3)
10     EnsureSConsVersion(0,96)
11 jgs 196
12 jgs 235 #
13     # set appropriate defaults for configuration variables
14 jgs 196
15 jgs 235 esysroot = Dir('#../../..')
16     usegcc = 0
17 jgs 196
18 jgs 235 #
19     # retreive command-line arguments if any
20 jgs 196
21 jgs 235 if ARGUMENTS.get('usegcc',0):
22     usegcc = 1
23 jgs 196
24 jgs 235 #
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 235 cxx_flags=cxx_flags_debug
48    
49     #
50     # print out build configuration for this module
51    
52     print "####################################################"
53     print "Build configuration for module: DataBlocks2D 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 196 datablocks2d_test_path = str(esysroot) + '/escript/test/DataBlocks2D'
65     escript_path = str(esysroot) + '/escript/inc'
66     esysUtils_path = str(esysroot) + '/esysUtils/inc'
67     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
68    
69     esys_lib_path = str(esysroot) + '/lib'
70     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
71     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
72    
73     cpp_path = [datablocks2d_test_path,
74     escript_path,
75     esysUtils_path,
76     CppUnitTest_path,
77     python_path,
78     boost_path]
79    
80     lib_path = [esys_lib_path,
81     esysUtils_lib_path,
82     CppUnitTest_lib_path,
83     python_lib_path,
84     boost_lib_path]
85    
86     libs = ['escriptcpp',
87     'esysUtils',
88     'CppUnitTest',
89 jgs 239 str(python_lib),
90     str(boost_lib),
91 jgs 196 'dl',
92     'util',
93     'guide',
94     'irc']
95    
96     sources = ['DataBlocks2DTestCase.cpp',
97     'DataBlocks2DTest.cpp']
98    
99     target = 'DataBlocks2DTest.exe'
100    
101     datablocks2d_env = Environment(ENV = os.environ)
102    
103 jgs 235 datablocks2d_env.Replace(CXX = cxx)
104 jgs 196 datablocks2d_env.Replace(CXXFLAGS = cxx_flags)
105     datablocks2d_env.Replace(CPPPATH = cpp_path)
106     datablocks2d_env.Replace(LIBPATH = lib_path)
107     datablocks2d_env.Replace(LIBS = libs)
108    
109     datablocks2d_test_exe = datablocks2d_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26