/[escript]/trunk/escript/test/DataVariable/SConscript
ViewVC logotype

Annotation of /trunk/escript/test/DataVariable/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 239 - (hide annotations)
Mon Nov 28 05:49:32 2005 UTC (13 years, 6 months ago) by jgs
Original Path: trunk/escript/test/DataVariable/SConstruct
File size: 2450 byte(s)
read names of python and boost libraries from config file now

1 jgs 235 # Scons configuration file for DataVariable 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     cxx_flags=cxx_flags_debug
45    
46     #
47     # print out build configuration for this module
48    
49     print "########################################################"
50     print "Build configuration for module: DataVariable 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 196 datavariable_test_path = str(esysroot) + '/escript/test/DataVariable'
62     escript_path = str(esysroot) + '/escript/inc'
63     esysUtils_path = str(esysroot) + '/esysUtils/inc'
64     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
65    
66     esys_lib_path = str(esysroot) + '/lib'
67     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
68     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
69    
70     cpp_path = [datavariable_test_path,
71     escript_path,
72     esysUtils_path,
73     CppUnitTest_path,
74     python_path,
75     boost_path]
76    
77     lib_path = [esys_lib_path,
78     esysUtils_lib_path,
79     CppUnitTest_lib_path,
80     python_lib_path,
81     boost_lib_path]
82    
83     libs = ['escriptcpp',
84     'esysUtils',
85     'CppUnitTest',
86 jgs 239 str(python_lib),
87     str(boost_lib),
88 jgs 196 'dl',
89     'util',
90     'guide',
91     'irc']
92    
93     sources = ['DataVariableTestCase.cpp',
94     'DataVariableTest.cpp']
95    
96     target = 'DataVariableTest.exe'
97    
98     datavariable_env = Environment(ENV = os.environ)
99    
100 jgs 235 datavariable_env.Replace(CXX = cxx)
101 jgs 196 datavariable_env.Replace(CXXFLAGS = cxx_flags)
102     datavariable_env.Replace(CPPPATH = cpp_path)
103     datavariable_env.Replace(LIBPATH = lib_path)
104     datavariable_env.Replace(LIBS = libs)
105    
106     datavariable_test_exe = datavariable_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26