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

Annotation of /trunk/escript/test/DataArrayView/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (hide annotations)
Tue Jan 10 04:10:39 2006 UTC (13 years, 10 months ago) by gross
File size: 2574 byte(s)
The sparse solver can be called by paso now. 

the building has been change to reduce some code redundancy:
now all scons SCscripts are importing scons/esys_options.py which
imports platform specific settings. 



1 jgs 235 # Scons configuration file for DataArrayView unit tests
2 gross 425 esysroot=str(Dir('./../../../..').abspath)
3     execfile(str(File(esysroot+"/scons/esys_options.py")))
4    
5 jgs 235 cxx_flags=cxx_flags_debug
6 gross 425
7 jgs 235 print "Build configuration for module: DataArrayView unit tests"
8     print " cxx: ", cxx
9 gross 425 print " cxx_flags: ", cxx_flags
10 jgs 235
11     #
12     # do the actual build
13    
14 jgs 196 dataarrayview_test_path = str(esysroot) + '/escript/test/DataArrayView'
15     escript_path = str(esysroot) + '/escript/inc'
16     esysUtils_path = str(esysroot) + '/esysUtils/inc'
17     CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
18    
19     esys_lib_path = str(esysroot) + '/lib'
20     esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
21     CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
22    
23 jgs 288 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
24    
25     install_dir = str(esysroot) + '/escript/test'
26    
27 jgs 196 cpp_path = [dataarrayview_test_path,
28     escript_path,
29     esysUtils_path,
30     CppUnitTest_path,
31     python_path,
32     boost_path]
33    
34     lib_path = [esys_lib_path,
35     esysUtils_lib_path,
36     CppUnitTest_lib_path,
37     python_lib_path,
38     boost_lib_path]
39    
40     libs = ['escriptcpp',
41     'esysUtils',
42     'CppUnitTest',
43 jgs 239 str(python_lib),
44     str(boost_lib),
45 jgs 196 'dl',
46 jgs 252 'util']
47 jgs 196
48 jgs 252 libs.extend(sys_libs)
49    
50 jgs 196 sources = ['DataArrayViewTestCase.cpp',
51     'DataArrayViewTest.cpp']
52    
53     target = 'DataArrayViewTest.exe'
54    
55 gross 425 import os
56 jgs 196 dataarrayview_env = Environment(ENV = os.environ)
57    
58 jgs 235 dataarrayview_env.Replace(CXX = cxx)
59 jgs 196 dataarrayview_env.Replace(CXXFLAGS = cxx_flags)
60     dataarrayview_env.Replace(CPPPATH = cpp_path)
61     dataarrayview_env.Replace(LIBPATH = lib_path)
62     dataarrayview_env.Replace(LIBS = libs)
63    
64     dataarrayview_test_exe = dataarrayview_env.Program(target, sources)
65 jgs 288
66     Depends(dataarrayview_test_exe, escript_lib)
67    
68 jgs 355 Alias("build_tests", dataarrayview_env.Install(install_dir, dataarrayview_test_exe))
69 jgs 360
70     import scons_extensions
71     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
72     dataarrayview_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
73    
74     Alias("run_tests", dataarrayview_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26