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

Contents of /trunk/escript/test/DataC/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 235 - (show annotations)
Mon Nov 28 04:36:16 2005 UTC (14 years, 8 months ago) by jgs
File size: 2517 byte(s)
change scons config files for escript unit tests to read
compiler options from option file now

1 # Scons configuration file for DataC 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 cc_flags=cc_flags_debug
45 cxx_flags=cxx_flags_debug
46
47 #
48 # print out build configuration for this module
49
50 print "####################################################"
51 print "Build configuration for module: DataC unit tests"
52 print " dodebug: 1"
53 print " usegcc: ", usegcc
54 print " cc: ", cc
55 print " cxx: ", cxx
56 print " platform: ", platform
57 print " hostname: ", hostname
58 print "####################################################"
59
60 #
61 # do the actual build
62
63 datac_test_path = str(esysroot) + '/escript/test/DataC'
64 escript_path = str(esysroot) + '/escript/inc'
65 esysUtils_path = str(esysroot) + '/esysUtils/inc'
66 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
67
68 esys_lib_path = str(esysroot) + '/lib'
69 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
70 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
71
72 cpp_path = [datac_test_path,
73 escript_path,
74 esysUtils_path,
75 CppUnitTest_path,
76 python_path,
77 boost_path]
78
79 lib_path = [esys_lib_path,
80 esysUtils_lib_path,
81 CppUnitTest_lib_path,
82 python_lib_path,
83 boost_lib_path]
84
85 libs = ['escriptcpp',
86 'esysUtils',
87 'CppUnitTest',
88 'python2.3',
89 'boost_python-intel-d-1_31',
90 'dl',
91 'util',
92 'guide',
93 'irc']
94
95 sources = ['DataCTestCase.cpp',
96 'DataCTest.cpp',
97 'compareCCall.c',
98 'CompareFuncs.c']
99
100 target = 'DataCTest.exe'
101
102 datac_env = Environment(ENV = os.environ)
103
104 datac_env.Replace(CXX = cxx)
105 datac_env.Replace(CC = cc)
106 datac_env.Replace(CXXFLAGS = cxx_flags)
107 datac_env.Replace(CCFLAGS = cc_flags)
108 datac_env.Replace(CPPPATH = cpp_path)
109 datac_env.Replace(LIBPATH = lib_path)
110 datac_env.Replace(LIBS = libs)
111
112 datac_test_exe = datac_env.Program(target, sources)

  ViewVC Help
Powered by ViewVC 1.1.26