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

Contents of /trunk/escript/test/DataC/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26