/[escript]/trunk/finley/test/MeshAdapter/SConscript
ViewVC logotype

Contents of /trunk/finley/test/MeshAdapter/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 425 - (show annotations)
Tue Jan 10 04:10:39 2006 UTC (14 years, 9 months ago) by gross
File size: 2888 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 finley MeshAdapter 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: MeshAdapter unit tests"
8 print " cxx: ", cxx
9 print " cxx_flags: ", cxx_flags
10
11 #
12 # do the actual build
13
14 meshadapter_test_path = str(esysroot) + '/finley/test/MeshAdapter'
15 escript_path = str(esysroot) + '/escript/inc'
16 finley_path = str(esysroot) + '/finley/src/finley'
17 finley_cppadapter_path = str(esysroot) + '/finley/src/finley/CPPAdapter'
18 paso_path = str(esysroot) + '/paso/inc'
19 mmio_path = str(esysroot) + '/tools/mmio/inc'
20 esysUtils_path = str(esysroot) + '/esysUtils/inc'
21 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
22
23 esys_lib_path = str(esysroot) + '/lib'
24 finley_lib_path = str(esysroot) + '/finley/lib'
25 mmio_lib_path = str(esysroot) + '/tools/mmio/lib'
26 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
27 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
28
29 finley_lib = str(esys_lib_path) + '/libfinleycpp.so'
30
31 install_dir = str(esysroot) + '/finley/test'
32
33 cpp_path = [meshadapter_test_path,
34 escript_path,
35 finley_path,
36 finley_cppadapter_path,
37 paso_path,
38 mmio_path,
39 esysUtils_path,
40 CppUnitTest_path,
41 python_path,
42 boost_path]
43
44 lib_path = [esys_lib_path,
45 finley_lib_path,
46 mmio_lib_path,
47 esysUtils_lib_path,
48 CppUnitTest_lib_path,
49 python_lib_path,
50 boost_lib_path]
51
52 libs = ['escriptcpp',
53 'esysUtils',
54 'finleycpp',
55 'paso',
56 'mmio',
57 'CppUnitTest',
58 str(python_lib),
59 str(boost_lib),
60 'dl',
61 'util']
62
63 libs.extend(sys_libs)
64 libs.extend(solver_libs)
65
66 sources = ['MeshAdapterTestCase.cpp',
67 'MeshAdapterTest.cpp']
68
69 target = 'MeshAdapterTest.exe'
70
71 import os
72 meshadapter_env = Environment(ENV = os.environ)
73
74 meshadapter_env.Replace(CXX = cxx)
75 meshadapter_env.Replace(CXXFLAGS = cxx_flags)
76 meshadapter_env.Replace(CPPPATH = cpp_path)
77 meshadapter_env.Replace(LIBPATH = lib_path)
78 meshadapter_env.Replace(LIBS = libs)
79
80 meshadapter_test_exe = meshadapter_env.Program(target, sources)
81
82 Depends(meshadapter_test_exe, finley_lib)
83
84 Alias("build_tests", meshadapter_env.Install(install_dir, meshadapter_test_exe))
85
86 import scons_extensions
87 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
88 meshadapter_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
89
90 Alias("run_tests", meshadapter_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26