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

Contents of /trunk/escript/test/FunctionSpace/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (show annotations)
Tue Jan 10 04:10:39 2006 UTC (13 years, 7 months ago) by gross
File size: 2575 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 FunctionSpace unit tests
2
3 esysroot=str(Dir('./../../../..').abspath)
4 execfile(str(File(esysroot+"/scons/esys_options.py")))
5
6 cxx_flags=cxx_flags_debug
7
8 print "Build configuration for module: FunctionSpace unit tests"
9 print " cxx: ", cxx
10 print " cxx_flags: ", cxx_flags
11
12 #
13 # do the actual build
14
15 functionspace_test_path = str(esysroot) + '/escript/test/FunctionSpace'
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 = [functionspace_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 = ['FunctionSpaceTestCase.cpp',
52 'FunctionSpaceTest.cpp']
53
54 target = 'FunctionSpaceTest.exe'
55
56 import os
57 functionspace_env = Environment(ENV = os.environ)
58
59 functionspace_env.Replace(CXX = cxx)
60 functionspace_env.Replace(CXXFLAGS = cxx_flags)
61 functionspace_env.Replace(CPPPATH = cpp_path)
62 functionspace_env.Replace(LIBPATH = lib_path)
63 functionspace_env.Replace(LIBS = libs)
64
65 functionspace_test_exe = functionspace_env.Program(target, sources)
66
67 Depends(functionspace_test_exe, escript_lib)
68
69 Alias("build_tests", functionspace_env.Install(install_dir, functionspace_test_exe))
70
71 import scons_extensions
72 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
73 functionspace_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
74
75 Alias("run_tests", functionspace_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26