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

Contents of /trunk/escript/test/DataAlgorithmAdapter/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


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

1 # Scons configuration file for DataAlgorithmAdapter 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: DataAlgorithmAdapter 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 dataalgorithmadapter_test_path = str(esysroot) + '/escript/test/DataAlgorithmAdapter'
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 = [dataalgorithmadapter_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 str(python_lib),
90 str(boost_lib),
91 'dl',
92 'util',
93 'guide',
94 'irc']
95
96 sources = ['DataAlgorithmAdapterTestCase.cpp',
97 'DataAlgorithmAdapterTest.cpp']
98
99 target = 'DataAlgorithmAdapterTest.exe'
100
101 dataalgorithmadapter_env = Environment(ENV = os.environ)
102
103 dataalgorithmadapter_env.Replace(CXX = cxx)
104 dataalgorithmadapter_env.Replace(CXXFLAGS = cxx_flags)
105 dataalgorithmadapter_env.Replace(CPPPATH = cpp_path)
106 dataalgorithmadapter_env.Replace(LIBPATH = lib_path)
107 dataalgorithmadapter_env.Replace(LIBS = libs)
108
109 dataalgorithmadapter_test_exe = dataalgorithmadapter_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26