blob: 1829268349caa0a8a74a865e4897a10a91cdb9e0 [file] [log] [blame]
David Reiss351e22b2010-08-31 16:51:19 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20noinst_LTLIBRARIES = libtestgencpp.la
21nodist_libtestgencpp_la_SOURCES = \
22 gen-cpp/DebugProtoTest_types.cpp \
23 gen-cpp/OptionalRequiredTest_types.cpp \
24 gen-cpp/DebugProtoTest_types.cpp \
25 gen-cpp/ThriftTest_types.cpp \
26 gen-cpp/DebugProtoTest_types.h \
27 gen-cpp/OptionalRequiredTest_types.h \
28 gen-cpp/ThriftTest_types.h \
29 ThriftTest_extras.cpp \
30 DebugProtoTest_extras.cpp
31
32ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
33DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
34
35libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
36
37noinst_PROGRAMS = Benchmark
38
39Benchmark_SOURCES = \
40 Benchmark.cpp
41
42Benchmark_LDADD = libtestgencpp.la
43
44check_PROGRAMS = \
45 TFDTransportTest \
46 TPipedTransportTest \
47 DebugProtoTest \
48 JSONProtoTest \
49 OptionalRequiredTest \
David Reisse71115b2010-10-06 17:09:56 +000050 SpecializationTest \
David Reiss351e22b2010-08-31 16:51:19 +000051 AllProtocolsTest \
David Reiss35dc7692010-10-06 17:10:19 +000052 TransportTest \
David Reiss9a961e72010-10-06 17:10:23 +000053 ZlibTest \
David Reiss709b69f2010-10-06 17:10:30 +000054 TFileTransportTest \
David Reiss351e22b2010-08-31 16:51:19 +000055 UnitTests
56
57TESTS = \
58 $(check_PROGRAMS)
59
60UnitTests_SOURCES = \
61 UnitTestMain.cpp \
62 TMemoryBufferTest.cpp \
63 TBufferBaseTest.cpp
64
Christian Lavoie4f42ef72010-11-04 18:51:42 +000065UnitTests_LDADD = \
66 $(BOOST_LDFLAGS) \
67 libtestgencpp.la \
68 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss351e22b2010-08-31 16:51:19 +000069
David Reiss35dc7692010-10-06 17:10:19 +000070TransportTest_SOURCES = \
71 TransportTest.cpp
72
Christian Lavoie4f42ef72010-11-04 18:51:42 +000073TransportTest_LDADD = \
74 libtestgencpp.la \
75 $(top_builddir)/lib/cpp/libthriftz.la \
76 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
77 -lz
David Reiss35dc7692010-10-06 17:10:19 +000078
David Reiss9a961e72010-10-06 17:10:23 +000079ZlibTest_SOURCES = \
80 ZlibTest.cpp
81
Christian Lavoie4f42ef72010-11-04 18:51:42 +000082ZlibTest_LDADD = \
83 libtestgencpp.la \
84 $(top_builddir)/lib/cpp/libthriftz.la \
85 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
86 -lz
David Reiss9a961e72010-10-06 17:10:23 +000087
David Reiss709b69f2010-10-06 17:10:30 +000088TFileTransportTest_SOURCES = \
89 TFileTransportTest.cpp
90
Christian Lavoie4f42ef72010-11-04 18:51:42 +000091TFileTransportTest_LDADD = \
92 libtestgencpp.la \
93 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss709b69f2010-10-06 17:10:30 +000094
David Reiss351e22b2010-08-31 16:51:19 +000095#
96# TFDTransportTest
97#
98TFDTransportTest_SOURCES = \
99 TFDTransportTest.cpp
100
101TFDTransportTest_LDADD = \
102 $(top_builddir)/lib/cpp/libthrift.la
103
104
105#
106# TPipedTransportTest
107#
108TPipedTransportTest_SOURCES = \
109 TPipedTransportTest.cpp
110
111TPipedTransportTest_LDADD = \
112 $(top_builddir)/lib/cpp/libthrift.la
113
114#
115# AllProtocolsTest
116#
117AllProtocolsTest_SOURCES = \
118 AllProtocolTests.cpp \
119 AllProtocolTests.tcc \
120 GenericHelpers.h
121
122AllProtocolsTest_LDADD = libtestgencpp.la
123
124#
125# DebugProtoTest
126#
127DebugProtoTest_SOURCES = \
128 DebugProtoTest.cpp
129
130DebugProtoTest_LDADD = libtestgencpp.la
131
132
133#
134# JSONProtoTest
135#
136JSONProtoTest_SOURCES = \
137 JSONProtoTest.cpp
138
139JSONProtoTest_LDADD = libtestgencpp.la
140
141#
142# OptionalRequiredTest
143#
144OptionalRequiredTest_SOURCES = \
145 OptionalRequiredTest.cpp
146
147OptionalRequiredTest_LDADD = libtestgencpp.la
148
David Reisse71115b2010-10-06 17:09:56 +0000149#
150# SpecializationTest
151#
152SpecializationTest_SOURCES = \
153 SpecializationTest.cpp
154
155SpecializationTest_LDADD = libtestgencpp.la
156
David Reiss351e22b2010-08-31 16:51:19 +0000157
158#
159# Common thrift code generation rules
160#
161THRIFT = $(top_builddir)/compiler/cpp/thrift
162
163gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
164 $(THRIFT) --gen cpp:dense $<
165
166gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
167 $(THRIFT) --gen cpp:dense $<
168
169gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
170 $(THRIFT) --gen cpp:dense $<
171
172gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: $(top_srcdir)/test/ThriftTest.thrift
173 $(THRIFT) --gen cpp:dense $<
174
175INCLUDES = \
176 -I$(top_srcdir)/lib/cpp/src
177
178AM_CPPFLAGS = $(BOOST_CPPFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000179AM_CXXFLAGS = -Wall
David Reiss351e22b2010-08-31 16:51:19 +0000180
181clean-local:
182 $(RM) -r gen-cpp
183
184EXTRA_DIST = \
David Reiss351e22b2010-08-31 16:51:19 +0000185 DenseProtoTest.cpp \
186 ThriftTest_extras.cpp \
187 DebugProtoTest_extras.cpp