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

Annotation of /trunk/escript/test/DataConstant/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (hide 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 jgs 235 # Scons configuration file for DataConstant 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: DataConstant unit tests"
8     print " cxx: ", cxx
9 gross 425 print " cxx_flags: ", cxx_flags
10 jgs 235
11 gross 425
12 jgs 235 #
13     # do the actual build
14    
15 jgs 196 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 jgs 288 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
25    
26     install_dir = str(esysroot) + '/escript/test'
27    
28 jgs 196 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 jgs 239 str(python_lib),
45     str(boost_lib),
46 jgs 196 'dl',
47 jgs 252 'util']
48 jgs 196
49 jgs 252 libs.extend(sys_libs)
50    
51 jgs 196 sources = ['DataConstantTestCase.cpp',
52     'DataConstantTest.cpp']
53    
54     target = 'DataConstantTest.exe'
55    
56 gross 425 import os
57 jgs 196 dataconstant_env = Environment(ENV = os.environ)
58    
59 jgs 235 dataconstant_env.Replace(CXX = cxx)
60 jgs 196 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 jgs 288
67     Depends(dataconstant_test_exe, escript_lib)
68    
69 jgs 355 Alias("build_tests", dataconstant_env.Install(install_dir, dataconstant_test_exe))
70 jgs 360
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