2affcccdfbf2b9d907a0ff7204c1d85c2cca8a84
[swift-upb.git] / tests / SConscript
1 import sys
2
3 Import("DEBUG")
4 Import("env")
5 Import("libs")
6 Import("libpath")
7
8 cpppath = env["CPPPATH"]
9 if DEBUG and sys.platform == "win32":
10         libs = ['swift','gtestd'] + libs  # order is important, crypto needs to be last
11 else:
12         libs = ['swift','gtest'] + libs  # order is important, crypto needs to be last
13
14 if sys.platform == "win32":
15     cpppath = ".."
16     libpath += '..;'
17     if DEBUG:
18         env.Append(CXXFLAGS="/Zi /Yd /MTd")
19 else:
20     cpppath = cpppath + ':..'
21     libpath += ':..'
22     if DEBUG:
23         env.Append(CXXFLAGS="-g")
24
25 print "tests: libpath is",libpath
26
27 env.Program( 
28     target='binstest2',
29     source=['binstest2.cpp'],
30     CPPPATH=cpppath,
31     LIBS=libs,
32     LIBPATH=libpath )
33
34 env.Program( 
35     target='dgramtest',
36     source=['dgramtest.cpp'],
37     CPPPATH=cpppath,
38     LIBS=libs,
39     LIBPATH=libpath )
40
41 env.Program( 
42     target='hashtest',
43     source=['hashtest.cpp'],
44     CPPPATH=cpppath,
45     LIBS=libs,
46     LIBPATH=libpath )
47
48 env.Program( 
49     target='ledbattest',
50     source=['ledbattest.cpp'],
51     CPPPATH=cpppath,
52     LIBS=libs,
53     LIBPATH=libpath )
54
55
56 if sys.platform != "win32":
57     # Arno: Needs getopt
58     env.Program( 
59         target='ledbattest2',
60         source=['ledbattest2.cpp'],
61         CPPPATH=cpppath,
62         LIBS=libs,
63         LIBPATH=libpath )
64
65 env.Program( 
66     target='freemap',
67     source=['freemap.cpp'],
68     CPPPATH=cpppath,
69     LIBS=libs,
70     LIBPATH=libpath )
71
72 env.Program( 
73     target='bin64test',
74     source=['bin64test.cpp'],
75     CPPPATH=cpppath,
76     LIBS=libs,
77     LIBPATH=libpath )
78
79 env.Program( 
80     target='transfertest',
81     source=['transfertest.cpp'],
82     CPPPATH=cpppath,
83     LIBS=libs,
84     LIBPATH=libpath )
85
86 env.Program( 
87     target='connecttest',
88     source=['connecttest.cpp'],
89     CPPPATH=cpppath,
90     LIBS=libs,
91     LIBPATH=libpath )
92