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

Contents of /trunk/escript/test/DataBlocks2D/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (show annotations)
Tue Jan 10 04:10:39 2006 UTC (14 years, 2 months ago) by gross
File size: 2553 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 # Scons configuration file for DataBlocks2D unit tests
2 esysroot=str(Dir('./../../../..').abspath)
3 execfile(str(File(esysroot+"/scons/esys_options.py")))
4
5 cxx_flags=cxx_flags_debug
6
7 print "Build configuration for module: DataBlocks2D unit tests"
8 print " cxx: ", cxx
9 print " cxx_flags: ", cxx_flags
10
11 #
12 # do the actual build
13
14 datablocks2d_test_path = str(esysroot) + '/escript/test/DataBlocks2D'
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 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
24
25 install_dir = str(esysroot) + '/escript/test'
26
27 cpp_path = [datablocks2d_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 str(python_lib),
44 str(boost_lib),
45 'dl',
46 'util']
47
48 libs.extend(sys_libs)
49
50 sources = ['DataBlocks2DTestCase.cpp',
51 'DataBlocks2DTest.cpp']
52
53 target = 'DataBlocks2DTest.exe'
54
55 import os
56 datablocks2d_env = Environment(ENV = os.environ)
57
58 datablocks2d_env.Replace(CXX = cxx)
59 datablocks2d_env.Replace(CXXFLAGS = cxx_flags)
60 datablocks2d_env.Replace(CPPPATH = cpp_path)
61 datablocks2d_env.Replace(LIBPATH = lib_path)
62 datablocks2d_env.Replace(LIBS = libs)
63
64 datablocks2d_test_exe = datablocks2d_env.Program(target, sources)
65
66 Depends(datablocks2d_test_exe, escript_lib)
67
68 Alias("build_tests", datablocks2d_env.Install(install_dir, datablocks2d_test_exe))
69
70 import scons_extensions
71 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
72 datablocks2d_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
73
74 Alias("run_tests", datablocks2d_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26