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

Diff of /trunk/escript/test/DataAlgorithmAdapter/SConscript

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

trunk/escript/test/DataAlgorithmAdapter/SConstruct revision 196 by jgs, Tue Nov 22 01:48:33 2005 UTC trunk/escript/test/DataAlgorithmAdapter/SConscript revision 309 by jgs, Mon Dec 5 01:59:58 2005 UTC
# Line 1  Line 1 
1  esysroot = None  # 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    options = None
18    sys_libs = []
19    
20    #
21    # import configuration variables passed in from
22    # calling SConscript (if any)
23    
24  Import('*')  Import('*')
25    
26  import os  #
27  import string  # retreive command-line arguments if any
28    
29    if ARGUMENTS.get('usegcc',0):
30      usegcc = 1
31    
32    if ARGUMENTS.get('options',0):
33      options = ARGUMENTS.get('options',0)
34    
35    #
36    # determine platform
37    
38    env = Environment(ENV = os.environ)
39    platform = env['PLATFORM']
40    
41  if esysroot == None:  #
42    esysroot = Dir('#../../..')  # determine hostname
43    
44  ##### these will enventually be loaded from an external config file ########  hostname = os.environ['HOSTNAME']
45    
46  cxx_flags = '-O0 -openmp -openmp_report0 -tpp2 -ansi -ansi_alias -no-gcc -fpic -w1'  #
47    # load configuration settings
48    
49  python_path = '/raid2/tools/python-2.3.4/include/python2.3'  options_dir = str(esysroot) + '/scons'
50  boost_path = '/raid2/tools/boost/include/boost-1_31'  sys.path.append(options_dir)
51    
52  python_lib_path = '/raid2/tools/python-2.3.4/lib'  from default_options import *
 boost_lib_path = '/raid2/tools/boost/lib'  
53    
54  ############################################################################  if hostname=='ess':
55      from ess_options import *
56    
57    if usegcc==1:
58      from gcc_options import *
59    
60    if options!=None:
61      exec "from " + options + " import *"
62    
63    cxx_flags=cxx_flags_debug
64    
65    #
66    # print out build configuration for this module
67    
68    print "Build configuration for module: DataAlgorithmAdapter unit tests"
69    print "         dodebug:  1"
70    print "          usegcc: ", usegcc
71    print "             cxx: ", cxx
72    print "        platform: ", platform
73    print "        hostname: ", hostname
74    
75    #
76    # do the actual build
77    
78  dataalgorithmadapter_test_path = str(esysroot) + '/escript/test/DataAlgorithmAdapter'  dataalgorithmadapter_test_path = str(esysroot) + '/escript/test/DataAlgorithmAdapter'
79  escript_path = str(esysroot) + '/escript/inc'  escript_path = str(esysroot) + '/escript/inc'
# Line 29  esys_lib_path = str(esysroot) + '/lib' Line 84  esys_lib_path = str(esysroot) + '/lib'
84  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'  esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
85  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'  CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
86    
87    escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
88    
89    install_dir = str(esysroot) + '/escript/test'
90    
91  cpp_path = [dataalgorithmadapter_test_path,  cpp_path = [dataalgorithmadapter_test_path,
92              escript_path,              escript_path,
93              esysUtils_path,              esysUtils_path,
# Line 45  lib_path = [esys_lib_path, Line 104  lib_path = [esys_lib_path,
104  libs = ['escriptcpp',  libs = ['escriptcpp',
105          'esysUtils',          'esysUtils',
106          'CppUnitTest',          'CppUnitTest',
107          'python2.3',          str(python_lib),
108          'boost_python-intel-d-1_31',          str(boost_lib),
109          'dl',          'dl',
110          'util',          'util']
111          'guide',  
112          'irc']  libs.extend(sys_libs)
113    
114  sources = ['DataAlgorithmAdapterTestCase.cpp',  sources = ['DataAlgorithmAdapterTestCase.cpp',
115             'DataAlgorithmAdapterTest.cpp']             'DataAlgorithmAdapterTest.cpp']
# Line 59  target = 'DataAlgorithmAdapterTest.exe' Line 118  target = 'DataAlgorithmAdapterTest.exe'
118    
119  dataalgorithmadapter_env = Environment(ENV = os.environ)  dataalgorithmadapter_env = Environment(ENV = os.environ)
120    
121  dataalgorithmadapter_env.Replace(CXX = 'icc')  dataalgorithmadapter_env.Replace(CXX = cxx)
122  dataalgorithmadapter_env.Replace(CXXFLAGS = cxx_flags)  dataalgorithmadapter_env.Replace(CXXFLAGS = cxx_flags)
123  dataalgorithmadapter_env.Replace(CPPPATH = cpp_path)  dataalgorithmadapter_env.Replace(CPPPATH = cpp_path)
124  dataalgorithmadapter_env.Replace(LIBPATH = lib_path)  dataalgorithmadapter_env.Replace(LIBPATH = lib_path)
125  dataalgorithmadapter_env.Replace(LIBS = libs)  dataalgorithmadapter_env.Replace(LIBS = libs)
126    
127  dataalgorithmadapter_test_exe = dataalgorithmadapter_env.Program(target, sources)  dataalgorithmadapter_test_exe = dataalgorithmadapter_env.Program(target, sources)
128    
129    Depends(dataalgorithmadapter_test_exe, escript_lib)
130    
131    dataalgorithmadapter_env.Install(install_dir, dataalgorithmadapter_test_exe)

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

  ViewVC Help
Powered by ViewVC 1.1.26