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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 455 - (show annotations)
Tue Jan 24 04:36:54 2006 UTC (13 years, 3 months ago) by jgs
File size: 2195 byte(s)
minor comment and formatting changes

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

  ViewVC Help
Powered by ViewVC 1.1.26