David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 1 | # |
| 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 | |
| 20 | noinst_LTLIBRARIES = libtestgencpp.la |
| 21 | nodist_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 | |
| 32 | ThriftTest_extras.o: gen-cpp/ThriftTest_types.h |
| 33 | DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h |
| 34 | |
| 35 | libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 36 | |
| 37 | noinst_PROGRAMS = Benchmark |
| 38 | |
| 39 | Benchmark_SOURCES = \ |
| 40 | Benchmark.cpp |
| 41 | |
| 42 | Benchmark_LDADD = libtestgencpp.la |
| 43 | |
| 44 | check_PROGRAMS = \ |
| 45 | TFDTransportTest \ |
| 46 | TPipedTransportTest \ |
| 47 | DebugProtoTest \ |
| 48 | JSONProtoTest \ |
| 49 | OptionalRequiredTest \ |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 50 | SpecializationTest \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 51 | AllProtocolsTest \ |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 52 | TransportTest \ |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 53 | ZlibTest \ |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 54 | TFileTransportTest \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 55 | UnitTests |
| 56 | |
| 57 | TESTS = \ |
| 58 | $(check_PROGRAMS) |
| 59 | |
| 60 | UnitTests_SOURCES = \ |
| 61 | UnitTestMain.cpp \ |
| 62 | TMemoryBufferTest.cpp \ |
| 63 | TBufferBaseTest.cpp |
| 64 | |
Roger Meier | 8a441a4 | 2010-10-04 21:13:36 +0000 | [diff] [blame] | 65 | UnitTests_LDADD = $(BOOST_LDFLAGS) libtestgencpp.la -lboost_unit_test_framework |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 66 | |
David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 67 | TransportTest_SOURCES = \ |
| 68 | TransportTest.cpp |
| 69 | |
| 70 | TransportTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz |
| 71 | |
David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 72 | ZlibTest_SOURCES = \ |
| 73 | ZlibTest.cpp |
| 74 | |
| 75 | ZlibTest_LDADD = libtestgencpp.la $(top_builddir)/lib/cpp/libthriftz.la -l:libboost_unit_test_framework.a -lz |
| 76 | |
David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 77 | TFileTransportTest_SOURCES = \ |
| 78 | TFileTransportTest.cpp |
| 79 | |
| 80 | TFileTransportTest_LDADD = libtestgencpp.la -l:libboost_unit_test_framework.a |
| 81 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 82 | # |
| 83 | # TFDTransportTest |
| 84 | # |
| 85 | TFDTransportTest_SOURCES = \ |
| 86 | TFDTransportTest.cpp |
| 87 | |
| 88 | TFDTransportTest_LDADD = \ |
| 89 | $(top_builddir)/lib/cpp/libthrift.la |
| 90 | |
| 91 | |
| 92 | # |
| 93 | # TPipedTransportTest |
| 94 | # |
| 95 | TPipedTransportTest_SOURCES = \ |
| 96 | TPipedTransportTest.cpp |
| 97 | |
| 98 | TPipedTransportTest_LDADD = \ |
| 99 | $(top_builddir)/lib/cpp/libthrift.la |
| 100 | |
| 101 | # |
| 102 | # AllProtocolsTest |
| 103 | # |
| 104 | AllProtocolsTest_SOURCES = \ |
| 105 | AllProtocolTests.cpp \ |
| 106 | AllProtocolTests.tcc \ |
| 107 | GenericHelpers.h |
| 108 | |
| 109 | AllProtocolsTest_LDADD = libtestgencpp.la |
| 110 | |
| 111 | # |
| 112 | # DebugProtoTest |
| 113 | # |
| 114 | DebugProtoTest_SOURCES = \ |
| 115 | DebugProtoTest.cpp |
| 116 | |
| 117 | DebugProtoTest_LDADD = libtestgencpp.la |
| 118 | |
| 119 | |
| 120 | # |
| 121 | # JSONProtoTest |
| 122 | # |
| 123 | JSONProtoTest_SOURCES = \ |
| 124 | JSONProtoTest.cpp |
| 125 | |
| 126 | JSONProtoTest_LDADD = libtestgencpp.la |
| 127 | |
| 128 | # |
| 129 | # OptionalRequiredTest |
| 130 | # |
| 131 | OptionalRequiredTest_SOURCES = \ |
| 132 | OptionalRequiredTest.cpp |
| 133 | |
| 134 | OptionalRequiredTest_LDADD = libtestgencpp.la |
| 135 | |
David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 136 | # |
| 137 | # SpecializationTest |
| 138 | # |
| 139 | SpecializationTest_SOURCES = \ |
| 140 | SpecializationTest.cpp |
| 141 | |
| 142 | SpecializationTest_LDADD = libtestgencpp.la |
| 143 | |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 144 | |
| 145 | # |
| 146 | # Common thrift code generation rules |
| 147 | # |
| 148 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 149 | |
| 150 | gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift |
| 151 | $(THRIFT) --gen cpp:dense $< |
| 152 | |
| 153 | gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift |
| 154 | $(THRIFT) --gen cpp:dense $< |
| 155 | |
| 156 | gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift |
| 157 | $(THRIFT) --gen cpp:dense $< |
| 158 | |
| 159 | gen-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 | |
| 162 | INCLUDES = \ |
| 163 | -I$(top_srcdir)/lib/cpp/src |
| 164 | |
| 165 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) |
| 166 | |
| 167 | clean-local: |
| 168 | $(RM) -r gen-cpp |
| 169 | |
| 170 | EXTRA_DIST = \ |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 171 | DenseProtoTest.cpp \ |
| 172 | ThriftTest_extras.cpp \ |
| 173 | DebugProtoTest_extras.cpp |