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

Diff of /trunk/escript/test/DataC/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 196 by jgs, Tue Nov 22 01:48:33 2005 UTC revision 235 by jgs, Mon Nov 28 04:36:16 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for DataC unit tests
   
 Import('*')  
2    
3  import os  import os
4  import string  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  if esysroot == None:  options_dir = str(esysroot) + '/scons'
39    esysroot = Dir('#../../..')  sys.path.append(options_dir)
40    
41  ##### these will enventually be loaded from an external config file ########  if hostname=='ess':
42      from ess_options import *
43    
44  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  cc_flags=cc_flags_debug
45    cxx_flags=cxx_flags_debug
46    
47  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  #
48  boost_path = '/raid2/tools/boost/include/boost-1_31'  # print out build configuration for this module
49    
50  python_lib_path = '/raid2/tools/python-2.3.4/lib'  print "####################################################"
51  boost_lib_path = '/raid2/tools/boost/lib'  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'  datac_test_path = str(esysroot) + '/escript/test/DataC'
64  escript_path = str(esysroot) + '/escript/inc'  escript_path = str(esysroot) + '/escript/inc'
# Line 61  target = 'DataCTest.exe' Line 101  target = 'DataCTest.exe'
101    
102  datac_env = Environment(ENV = os.environ)  datac_env = Environment(ENV = os.environ)
103    
104  datac_env.Replace(CXX = 'icc')  datac_env.Replace(CXX = cxx)
105  datac_env.Replace(CC = 'icc')  datac_env.Replace(CC = cc)
106  datac_env.Replace(CXXFLAGS = cxx_flags)  datac_env.Replace(CXXFLAGS = cxx_flags)
107  datac_env.Replace(CCFLAGS = cxx_flags)  datac_env.Replace(CCFLAGS = cc_flags)
108  datac_env.Replace(CPPPATH = cpp_path)  datac_env.Replace(CPPPATH = cpp_path)
109  datac_env.Replace(LIBPATH = lib_path)  datac_env.Replace(LIBPATH = lib_path)
110  datac_env.Replace(LIBS = libs)  datac_env.Replace(LIBS = libs)

Legend:
Removed from v.196  
changed lines
  Added in v.235

  ViewVC Help
Powered by ViewVC 1.1.26