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

Annotation of /trunk/escript/test/DataExpanded/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 235 # Scons configuration file for DataExpanded unit tests
2 jgs 196
3 jgs 455 #
4     # set appropriate defaults for configuration variables
5 gross 425 esysroot=str(Dir('./../../../..').abspath)
6     execfile(str(File(esysroot+"/scons/esys_options.py")))
7 jgs 455
8 jgs 235 cxx_flags=cxx_flags_debug
9 jgs 455
10 jgs 235 print "Build configuration for module: DataExpanded unit tests"
11     print " cxx: ", cxx
12 gross 425 print " cxx_flags: ", cxx_flags
13 jgs 235
14     #
15     # do the actual build
16    
17 jgs 196 dataexpanded_test_path = str(esysroot) + '/escript/test/DataExpanded'
18 jgs 474 escript_path = str(esysroot) + '/escript/src'
19 jgs 468 esysUtils_path = str(esysroot) + '/esysUtils/src'
20 jgs 196 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 jgs 288 escript_lib = str(esys_lib_path) + '/libescriptcpp.so'
27    
28     install_dir = str(esysroot) + '/escript/test'
29    
30 jgs 196 cpp_path = [dataexpanded_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 jgs 239 str(python_lib),
47     str(boost_lib),
48 jgs 196 'dl',
49 jgs 252 'util']
50 jgs 196
51 jgs 252 libs.extend(sys_libs)
52    
53 jgs 196 sources = ['DataExpandedTestCase.cpp',
54     'DataExpandedTest.cpp']
55    
56     target = 'DataExpandedTest.exe'
57    
58 gross 425 import os
59 jgs 196 dataexpanded_env = Environment(ENV = os.environ)
60    
61 jgs 235 dataexpanded_env.Replace(CXX = cxx)
62 jgs 196 dataexpanded_env.Replace(CXXFLAGS = cxx_flags)
63     dataexpanded_env.Replace(CPPPATH = cpp_path)
64     dataexpanded_env.Replace(LIBPATH = lib_path)
65     dataexpanded_env.Replace(LIBS = libs)
66    
67     dataexpanded_test_exe = dataexpanded_env.Program(target, sources)
68 jgs 288
69     Depends(dataexpanded_test_exe, escript_lib)
70    
71 jgs 355 Alias("build_tests", dataexpanded_env.Install(install_dir, dataexpanded_test_exe))
72 jgs 360
73     import scons_extensions
74     runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', single_source=True)
75     dataexpanded_env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
76    
77     Alias("run_tests", dataexpanded_env.RunUnitTest(target))

  ViewVC Help
Powered by ViewVC 1.1.26