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

Contents of /trunk/escript/test/DataC/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: 2551 byte(s)
if usegcc=1 is set on command line, load compiler options
fropm scons/gcc_options.py

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

  ViewVC Help
Powered by ViewVC 1.1.26