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

Contents of /trunk/escript/test/DataAlgorithmAdapter/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 474 - (show annotations)
Mon Jan 30 04:23:44 2006 UTC (14 years, 4 months ago) by jgs
File size: 2436 byte(s)
restructure escript source tree
move src/Data/* -> src
remove inc
modify #includes and cpppath settings accordingly

1 # Scons configuration file for DataAlgorithmAdapter unit tests
2
3 #
4 # set appropriate defaults for configuration variables
5 esysroot=str(Dir('./../../../..').abspath)
6 execfile(str(File(esysroot+"/scons/esys_options.py")))
7
8 cxx_flags=cxx_flags_debug
9
10 # print out build configuration for this module
11
12 print "Build configuration for module: DataAlgorithmAdapter unit tests"
13 print " cxx: ", cxx
14 print " cxx_flags: ", cxx_flags
15
16 #
17 # do the actual build
18
19 dataalgorithmadapter_test_path = str(esysroot) + '/escript/test/DataAlgorithmAdapter'
20 escript_path = str(esysroot) + '/escript/src'
21 esysUtils_path = str(esysroot) + '/esysUtils/src'
22 CppUnitTest_path = str(esysroot) + '/tools/CppUnitTest/inc'
23
24 esys_lib_path = str(esysroot) + '/lib'
25 esysUtils_lib_path = str(esysroot) + '/esysUtils/lib'
26 CppUnitTest_lib_path = str(esysroot) + '/tools/CppUnitTest/lib'
27
28 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
29
30 install_dir = str(esysroot) + '/escript/test'
31
32 cpp_path = [dataalgorithmadapter_test_path,
33 escript_path,
34 esysUtils_path,
35 CppUnitTest_path,
36 python_path,
37 boost_path]
38
39 lib_path = [esys_lib_path,
40 esysUtils_lib_path,
41 CppUnitTest_lib_path,
42 python_lib_path,
43 boost_lib_path]
44
45 libs = ['escriptcpp',
46 'esysUtils',
47 'CppUnitTest',
48 str(python_lib),
49 str(boost_lib),
50 'dl',
51 'util']
52
53 libs.extend(sys_libs)
54
55 sources = ['DataAlgorithmAdapterTestCase.cpp',
56 'DataAlgorithmAdapterTest.cpp']
57
58 target = 'DataAlgorithmAdapterTest.exe'
59
60 import os
61 dataalgorithmadapter_env = Environment(ENV = os.environ)
62
63 dataalgorithmadapter_env.Replace(CXX = cxx)
64 dataalgorithmadapter_env.Replace(CXXFLAGS = cxx_flags)
65 dataalgorithmadapter_env.Replace(CPPPATH = cpp_path)
66 dataalgorithmadapter_env.Replace(LIBPATH = lib_path)
67 dataalgorithmadapter_env.Replace(LIBS = libs)
68
69 dataalgorithmadapter_test_exe = dataalgorithmadapter_env.Program(target, sources)
70
71 Depends(dataalgorithmadapter_test_exe, escript_lib)
72
73 Alias("build_tests", dataalgorithmadapter_env.Install(install_dir, dataalgorithmadapter_test_exe))
74
75 import scons_extensions
76 runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
77 dataalgorithmadapter_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
78
79 Alias("run_tests", dataalgorithmadapter_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26