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