blob: 536796f01cffa9efe7685d9950b451c434f0b7fc [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 \
52 UnitTests
53
54TESTS = \
55 $(check_PROGRAMS)
56
57UnitTests_SOURCES = \
58 UnitTestMain.cpp \
59 TMemoryBufferTest.cpp \
60 TBufferBaseTest.cpp
61
Roger Meier8a441a42010-10-04 21:13:36 +000062UnitTests_LDADD = $(BOOST_LDFLAGS) libtestgencpp.la -lboost_unit_test_framework
David Reiss351e22b2010-08-31 16:51:19 +000063
64#
65# TFDTransportTest
66#
67TFDTransportTest_SOURCES = \
68 TFDTransportTest.cpp
69
70TFDTransportTest_LDADD = \
71 $(top_builddir)/lib/cpp/libthrift.la
72
73
74#
75# TPipedTransportTest
76#
77TPipedTransportTest_SOURCES = \
78 TPipedTransportTest.cpp
79
80TPipedTransportTest_LDADD = \
81 $(top_builddir)/lib/cpp/libthrift.la
82
83#
84# AllProtocolsTest
85#
86AllProtocolsTest_SOURCES = \
87 AllProtocolTests.cpp \
88 AllProtocolTests.tcc \
89 GenericHelpers.h
90
91AllProtocolsTest_LDADD = libtestgencpp.la
92
93#
94# DebugProtoTest
95#
96DebugProtoTest_SOURCES = \
97 DebugProtoTest.cpp
98
99DebugProtoTest_LDADD = libtestgencpp.la
100
101
102#
103# JSONProtoTest
104#
105JSONProtoTest_SOURCES = \
106 JSONProtoTest.cpp
107
108JSONProtoTest_LDADD = libtestgencpp.la
109
110#
111# OptionalRequiredTest
112#
113OptionalRequiredTest_SOURCES = \
114 OptionalRequiredTest.cpp
115
116OptionalRequiredTest_LDADD = libtestgencpp.la
117
David Reisse71115b2010-10-06 17:09:56 +0000118#
119# SpecializationTest
120#
121SpecializationTest_SOURCES = \
122 SpecializationTest.cpp
123
124SpecializationTest_LDADD = libtestgencpp.la
125
David Reiss351e22b2010-08-31 16:51:19 +0000126
127#
128# Common thrift code generation rules
129#
130THRIFT = $(top_builddir)/compiler/cpp/thrift
131
132gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
133 $(THRIFT) --gen cpp:dense $<
134
135gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
136 $(THRIFT) --gen cpp:dense $<
137
138gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
139 $(THRIFT) --gen cpp:dense $<
140
141gen-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
142 $(THRIFT) --gen cpp:dense $<
143
144INCLUDES = \
145 -I$(top_srcdir)/lib/cpp/src
146
147AM_CPPFLAGS = $(BOOST_CPPFLAGS)
148
149clean-local:
150 $(RM) -r gen-cpp
151
152EXTRA_DIST = \
153 ZlibTest.cpp \
154 DenseProtoTest.cpp \
155 ThriftTest_extras.cpp \
156 DebugProtoTest_extras.cpp