/[escript]/trunk/esysUtils/test/EsysException/SConscript
ViewVC logotype

Diff of /trunk/esysUtils/test/EsysException/SConscript

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

revision 197 by jgs, Tue Nov 22 02:01:35 2005 UTC revision 227 by jgs, Fri Nov 25 01:49:23 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # Scons configuration file for esysUtils unit tests
   
 Import('*')  
2    
3  import os  import os
4  import string  import sys
5    
6    # ensure correct versions of python and scons
7    
8    EnsurePythonVersion(2,3)
9    EnsureSConsVersion(0,96)
10    
11    #
12    # set appropriate defaults for configuration variables
13    
14    esysroot = Dir('#../../..')
15    usegcc = 0
16    
17    #
18    # retreive command-line arguments if any
19    
20    if ARGUMENTS.get('usegcc',0):
21      usegcc = 1
22    
23    #
24    # determine platform
25    
26    env = Environment(ENV = os.environ)
27    platform = env['PLATFORM']
28    
29    #
30    # determine hostname
31    
32    hostname = os.environ['HOSTNAME']
33    
34    #
35    # load configuration settings
36    
37    options_dir = str(esysroot) + '/scons'
38    sys.path.append(options_dir)
39    
40    if hostname=='ess':
41      from ess_options import *
42    
43  if esysroot == None:  cxx_flags=cxx_flags_debug
   esysroot = Dir('#../../..')  
44    
45  ##### these will enventually be loaded from an external config file ########  #
46    # print out build configuration for this module
47    
48  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  print "####################################################"
49    print "Build configuration for module: Bruce unit tests"
50    print "Build configuration for module: Bruce 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  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'  esysexception_test_path = str(esysroot) + '/esysUtils/test/EsysException'
62  esysUtils_path = str(esysroot) + '/esysUtils/inc'  esysUtils_path = str(esysroot) + '/esysUtils/inc'
# Line 40  target = 'EsysExceptionTest.exe' Line 84  target = 'EsysExceptionTest.exe'
84    
85  esysexception_env = Environment(ENV = os.environ)  esysexception_env = Environment(ENV = os.environ)
86    
87  esysexception_env.Replace(CXX = 'icc')  esysexception_env.Replace(CXX = cxx)
 esysexception_env.Replace(CC = 'icc')  
88  esysexception_env.Replace(CXXFLAGS = cxx_flags)  esysexception_env.Replace(CXXFLAGS = cxx_flags)
 esysexception_env.Replace(CCFLAGS = cxx_flags)  
89  esysexception_env.Replace(CPPPATH = cpp_path)  esysexception_env.Replace(CPPPATH = cpp_path)
90  esysexception_env.Replace(LIBPATH = lib_path)  esysexception_env.Replace(LIBPATH = lib_path)
91  esysexception_env.Replace(LIBS = libs)  esysexception_env.Replace(LIBS = libs)

Legend:
Removed from v.197  
changed lines
  Added in v.227

  ViewVC Help
Powered by ViewVC 1.1.26