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

Contents of /trunk/escript/test/DataConstant/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (show annotations)
Tue Jan 10 04:10:39 2006 UTC (15 years, 1 month ago) by gross
File size: 2554 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 DataConstant 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: DataConstant unit tests"
8 print " cxx: ", cxx
9 print " cxx_flags: ", cxx_flags
10
11
12 #
13 # do the actual build
14
15 dataconstant_test_path = str(esysroot) + '/escript/test/DataConstant'
16 escript_path = str(esysroot) + '/escript/inc'
17 esysUtils_path = str(esysroot) + '/esysUtils/inc'
18 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
19
20 esys_lib_path = str(esysroot) + '/lib'
21 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
22 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
23
24 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
25
26 install_dir = str(esysroot) + '/escript/test'
27
28 cpp_path = [dataconstant_test_path,
29 escript_path,
30 esysUtils_path,
31 CppUnitTest_path,
32 python_path,
33 boost_path]
34
35 lib_path = [esys_lib_path,
36 esysUtils_lib_path,
37 CppUnitTest_lib_path,
38 python_lib_path,
39 boost_lib_path]
40
41 libs = ['escriptcpp',
42 'esysUtils',
43 'CppUnitTest',
44 str(python_lib),
45 str(boost_lib),
46 'dl',
47 'util']
48
49 libs.extend(sys_libs)
50
51 sources = ['DataConstantTestCase.cpp',
52 'DataConstantTest.cpp']
53
54 target = 'DataConstantTest.exe'
55
56 import os
57 dataconstant_env = Environment(ENV = os.environ)
58
59 dataconstant_env.Replace(CXX = cxx)
60 dataconstant_env.Replace(CXXFLAGS = cxx_flags)
61 dataconstant_env.Replace(CPPPATH = cpp_path)
62 dataconstant_env.Replace(LIBPATH = lib_path)
63 dataconstant_env.Replace(LIBS = libs)
64
65 dataconstant_test_exe = dataconstant_env.Program(target, sources)
66
67 Depends(dataconstant_test_exe, escript_lib)
68
69 Alias("build_tests", dataconstant_env.Install(install_dir, dataconstant_test_exe))
70
71 import scons_extensions
72 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
73 dataconstant_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
74
75 Alias("run_tests", dataconstant_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26