/[ascend]/trunk/base/generic/test/SConscript
ViewVC logotype

Contents of /trunk/base/generic/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1029 - (show annotations) (download)
Wed Jan 3 14:00:27 2007 UTC (17 years, 11 months ago) by johnpye
File size: 1169 byte(s)
Fixed for reporting of METHOD errors in PyGTK GUI.
Removed libasctest target (was causing messed up build on Windows)
Removed attempt to link libasctestsuite to -ldl on Windows (not necessary)
Adding reporting in test.c when no tests have been registered (to flag a problem with static/dynamic linking of CUnit on Windows)
1 Import('env')
2 import platform
3
4 testsrcs = ['#test/'+i for i in Split("""
5 assertimpl.c
6 printutil.c
7 redirectStdStreams.c
8 """)]
9
10 basesrcs = ['test_ascend_base.c']
11
12 srcs = []
13 for dir in ['general','utilities','solver']:
14 srcs += env['TESTSRCS_'+dir.upper()]
15
16 cpppath = ['#test','#base/generic']
17 if env.has_key('CUNIT_CPPPATH'):
18 cpppath.append(env['CUNIT_CPPPATH'])
19
20 libpath = ['#', '#test', '#base/generic/test']
21 if env.has_key('CUNIT_LIBPATH'):
22 libpath.append(env['CUNIT_LIBPATH'])
23 #print "CUNIT_LIBPATH ---> ",libpath
24
25 cppdefines = []
26 if env.has_key('CPPDEFINES'):
27 cppdefines += env.get('CPPDEFINES')
28 cppdefines += ['-DASC_SHARED']
29
30 libs = ['ascend','m','cunit']
31 if platform.system()!="Windows":
32 libs += ['dl']
33
34 objs = []
35 for src in srcs+testsrcs:
36 objs += env.SharedObject(src
37 , CPPPATH = cpppath
38 )
39
40 objs += env.SharedObject('test_ascend_base.c'
41 , CPPPATH = cpppath
42 )
43
44 print "OBJS = "
45 for o in objs:
46 print o
47
48 env.SharedLibrary('asctestsuite',objs
49 , CPPPATH = cpppath
50 , LIBS = libs
51 , LIBPATH = libpath
52 , CPPDEFINES = cppdefines
53 )
54
55 env.Program('test',['test.c']
56 , CPPPATH = cpppath
57 , LIBS = ['ascend','cunit','asctestsuite']
58 , LIBPATH = libpath
59 )

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22