blob: 33b7481685ae3927d01e814ac622b432ec86c8a4 [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 Reiss351e22b2010-08-31 16:51:19 +000054 UnitTests
55
56TESTS = \
57 $(check_PROGRAMS)
58
59UnitTests_SOURCES = \
60 UnitTestMain.cpp \
61 TMemoryBufferTest.cpp \
62 TBufferBaseTest.cpp
63
Roger Meier8a441a42010-10-04 21:13:36 +000064UnitTests_LDADD = $(BOOST_LDFLAGS) libtestgencpp.la -lboost_unit_test_framework
David Reiss351e22b2010-08-31 16:51:19 +000065
David Reiss35dc7692010-10-06 17:10:19 +000066TransportTest_SOURCES = \
67 TransportTest.cpp
68
69TransportTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz
70
David Reiss9a961e72010-10-06 17:10:23 +000071ZlibTest_SOURCES = \
72 ZlibTest.cpp
73
74ZlibTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz
75
David Reiss351e22b2010-08-31 16:51:19 +000076#
77# TFDTransportTest
78#
79TFDTransportTest_SOURCES = \
80 TFDTransportTest.cpp
81
82TFDTransportTest_LDADD = \
83 $(top_builddir)/lib/cpp/libthrift.la
84
85
86#
87# TPipedTransportTest
88#
89TPipedTransportTest_SOURCES = \
90 TPipedTransportTest.cpp
91
92TPipedTransportTest_LDADD = \
93 $(top_builddir)/lib/cpp/libthrift.la
94
95#
96# AllProtocolsTest
97#
98AllProtocolsTest_SOURCES = \
99 AllProtocolTests.cpp \
100 AllProtocolTests.tcc \
101 GenericHelpers.h
102
103AllProtocolsTest_LDADD = libtestgencpp.la
104
105#
106# DebugProtoTest
107#
108DebugProtoTest_SOURCES = \
109 DebugProtoTest.cpp
110
111DebugProtoTest_LDADD = libtestgencpp.la
112
113
114#
115# JSONProtoTest
116#
117JSONProtoTest_SOURCES = \
118 JSONProtoTest.cpp
119
120JSONProtoTest_LDADD = libtestgencpp.la
121
122#
123# OptionalRequiredTest
124#
125OptionalRequiredTest_SOURCES = \
126 OptionalRequiredTest.cpp
127
128OptionalRequiredTest_LDADD = libtestgencpp.la
129
David Reisse71115b2010-10-06 17:09:56 +0000130#
131# SpecializationTest
132#
133SpecializationTest_SOURCES = \
134 SpecializationTest.cpp
135
136SpecializationTest_LDADD = libtestgencpp.la
137
David Reiss351e22b2010-08-31 16:51:19 +0000138
139#
140# Common thrift code generation rules
141#
142THRIFT = $(top_builddir)/compiler/cpp/thrift
143
144gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
145 $(THRIFT) --gen cpp:dense $<
146
147gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
148 $(THRIFT) --gen cpp:dense $<
149
150gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
151 $(THRIFT) --gen cpp:dense $<
152
153gen-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
154 $(THRIFT) --gen cpp:dense $<
155
156INCLUDES = \
157 -I$(top_srcdir)/lib/cpp/src
158
159AM_CPPFLAGS = $(BOOST_CPPFLAGS)
160
161clean-local:
162 $(RM) -r gen-cpp
163
164EXTRA_DIST = \
David Reiss351e22b2010-08-31 16:51:19 +0000165 DenseProtoTest.cpp \
166 ThriftTest_extras.cpp \
167 DebugProtoTest_extras.cpp