blob: 1fadff3ec7fa7857dba213e3899669b9cadd5220 [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
Roger Meier8a441a42010-10-04 21:13:36 +000065UnitTests_LDADD = $(BOOST_LDFLAGS) libtestgencpp.la -lboost_unit_test_framework
David Reiss351e22b2010-08-31 16:51:19 +000066
David Reiss35dc7692010-10-06 17:10:19 +000067TransportTest_SOURCES = \
68 TransportTest.cpp
69
70TransportTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz
71
David Reiss9a961e72010-10-06 17:10:23 +000072ZlibTest_SOURCES = \
73 ZlibTest.cpp
74
75ZlibTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz
76
David Reiss709b69f2010-10-06 17:10:30 +000077TFileTransportTest_SOURCES = \
78 TFileTransportTest.cpp
79
80TFileTransportTest_LDADD = libtestgencpp.la -l:libboost_unit_test_framework.a
81
David Reiss351e22b2010-08-31 16:51:19 +000082#
83# TFDTransportTest
84#
85TFDTransportTest_SOURCES = \
86 TFDTransportTest.cpp
87
88TFDTransportTest_LDADD = \
89 $(top_builddir)/lib/cpp/libthrift.la
90
91
92#
93# TPipedTransportTest
94#
95TPipedTransportTest_SOURCES = \
96 TPipedTransportTest.cpp
97
98TPipedTransportTest_LDADD = \
99 $(top_builddir)/lib/cpp/libthrift.la
100
101#
102# AllProtocolsTest
103#
104AllProtocolsTest_SOURCES = \
105 AllProtocolTests.cpp \
106 AllProtocolTests.tcc \
107 GenericHelpers.h
108
109AllProtocolsTest_LDADD = libtestgencpp.la
110
111#
112# DebugProtoTest
113#
114DebugProtoTest_SOURCES = \
115 DebugProtoTest.cpp
116
117DebugProtoTest_LDADD = libtestgencpp.la
118
119
120#
121# JSONProtoTest
122#
123JSONProtoTest_SOURCES = \
124 JSONProtoTest.cpp
125
126JSONProtoTest_LDADD = libtestgencpp.la
127
128#
129# OptionalRequiredTest
130#
131OptionalRequiredTest_SOURCES = \
132 OptionalRequiredTest.cpp
133
134OptionalRequiredTest_LDADD = libtestgencpp.la
135
David Reisse71115b2010-10-06 17:09:56 +0000136#
137# SpecializationTest
138#
139SpecializationTest_SOURCES = \
140 SpecializationTest.cpp
141
142SpecializationTest_LDADD = libtestgencpp.la
143
David Reiss351e22b2010-08-31 16:51:19 +0000144
145#
146# Common thrift code generation rules
147#
148THRIFT = $(top_builddir)/compiler/cpp/thrift
149
150gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
151 $(THRIFT) --gen cpp:dense $<
152
153gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
154 $(THRIFT) --gen cpp:dense $<
155
156gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
157 $(THRIFT) --gen cpp:dense $<
158
159gen-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
160 $(THRIFT) --gen cpp:dense $<
161
162INCLUDES = \
163 -I$(top_srcdir)/lib/cpp/src
164
165AM_CPPFLAGS = $(BOOST_CPPFLAGS)
166
167clean-local:
168 $(RM) -r gen-cpp
169
170EXTRA_DIST = \
David Reiss351e22b2010-08-31 16:51:19 +0000171 DenseProtoTest.cpp \
172 ThriftTest_extras.cpp \
173 DebugProtoTest_extras.cpp