| 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 |  | 
| Roger Meier | 9e0f074 | 2011-08-03 17:36:55 +0000 | [diff] [blame] | 57 | TESTS_ENVIRONMENT= \ | 
|  | 58 | BOOST_TEST_LOG_SINK=tests.xml \ | 
|  | 59 | BOOST_TEST_LOG_LEVEL=test_suite \ | 
|  | 60 | BOOST_TEST_LOG_FORMAT=xml | 
|  | 61 |  | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 62 | TESTS = \ | 
|  | 63 | $(check_PROGRAMS) | 
|  | 64 |  | 
|  | 65 | UnitTests_SOURCES = \ | 
|  | 66 | UnitTestMain.cpp \ | 
|  | 67 | TMemoryBufferTest.cpp \ | 
| Roger Meier | 3fc4819 | 2011-12-11 21:05:35 +0000 | [diff] [blame] | 68 | TBufferBaseTest.cpp \ | 
|  | 69 | RWMutexStarveTest.cpp | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 70 |  | 
| Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 71 | UnitTests_LDADD = \ | 
| Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 72 | libtestgencpp.la \ | 
|  | 73 | $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 74 |  | 
| David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 75 | TransportTest_SOURCES = \ | 
|  | 76 | TransportTest.cpp | 
|  | 77 |  | 
| Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 78 | TransportTest_LDADD = \ | 
|  | 79 | libtestgencpp.la \ | 
|  | 80 | $(top_builddir)/lib/cpp/libthriftz.la \ | 
|  | 81 | $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \ | 
|  | 82 | -lz | 
| David Reiss | 35dc769 | 2010-10-06 17:10:19 +0000 | [diff] [blame] | 83 |  | 
| David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 84 | ZlibTest_SOURCES = \ | 
|  | 85 | ZlibTest.cpp | 
|  | 86 |  | 
| Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 87 | ZlibTest_LDADD = \ | 
|  | 88 | libtestgencpp.la \ | 
|  | 89 | $(top_builddir)/lib/cpp/libthriftz.la \ | 
|  | 90 | $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \ | 
|  | 91 | -lz | 
| David Reiss | 9a961e7 | 2010-10-06 17:10:23 +0000 | [diff] [blame] | 92 |  | 
| David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 93 | TFileTransportTest_SOURCES = \ | 
|  | 94 | TFileTransportTest.cpp | 
|  | 95 |  | 
| Christian Lavoie | 4f42ef7 | 2010-11-04 18:51:42 +0000 | [diff] [blame] | 96 | TFileTransportTest_LDADD = \ | 
|  | 97 | libtestgencpp.la \ | 
|  | 98 | $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a | 
| David Reiss | 709b69f | 2010-10-06 17:10:30 +0000 | [diff] [blame] | 99 |  | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 100 | # | 
|  | 101 | # TFDTransportTest | 
|  | 102 | # | 
|  | 103 | TFDTransportTest_SOURCES = \ | 
|  | 104 | TFDTransportTest.cpp | 
|  | 105 |  | 
|  | 106 | TFDTransportTest_LDADD = \ | 
|  | 107 | $(top_builddir)/lib/cpp/libthrift.la | 
|  | 108 |  | 
|  | 109 |  | 
|  | 110 | # | 
|  | 111 | # TPipedTransportTest | 
|  | 112 | # | 
|  | 113 | TPipedTransportTest_SOURCES = \ | 
|  | 114 | TPipedTransportTest.cpp | 
|  | 115 |  | 
|  | 116 | TPipedTransportTest_LDADD = \ | 
|  | 117 | $(top_builddir)/lib/cpp/libthrift.la | 
|  | 118 |  | 
|  | 119 | # | 
|  | 120 | # AllProtocolsTest | 
|  | 121 | # | 
|  | 122 | AllProtocolsTest_SOURCES = \ | 
|  | 123 | AllProtocolTests.cpp \ | 
|  | 124 | AllProtocolTests.tcc \ | 
|  | 125 | GenericHelpers.h | 
|  | 126 |  | 
|  | 127 | AllProtocolsTest_LDADD = libtestgencpp.la | 
|  | 128 |  | 
|  | 129 | # | 
|  | 130 | # DebugProtoTest | 
|  | 131 | # | 
|  | 132 | DebugProtoTest_SOURCES = \ | 
|  | 133 | DebugProtoTest.cpp | 
|  | 134 |  | 
|  | 135 | DebugProtoTest_LDADD = libtestgencpp.la | 
|  | 136 |  | 
|  | 137 |  | 
|  | 138 | # | 
|  | 139 | # JSONProtoTest | 
|  | 140 | # | 
|  | 141 | JSONProtoTest_SOURCES = \ | 
|  | 142 | JSONProtoTest.cpp | 
|  | 143 |  | 
|  | 144 | JSONProtoTest_LDADD = libtestgencpp.la | 
|  | 145 |  | 
|  | 146 | # | 
|  | 147 | # OptionalRequiredTest | 
|  | 148 | # | 
|  | 149 | OptionalRequiredTest_SOURCES = \ | 
|  | 150 | OptionalRequiredTest.cpp | 
|  | 151 |  | 
|  | 152 | OptionalRequiredTest_LDADD = libtestgencpp.la | 
|  | 153 |  | 
| David Reiss | e71115b | 2010-10-06 17:09:56 +0000 | [diff] [blame] | 154 | # | 
|  | 155 | # SpecializationTest | 
|  | 156 | # | 
|  | 157 | SpecializationTest_SOURCES = \ | 
|  | 158 | SpecializationTest.cpp | 
|  | 159 |  | 
|  | 160 | SpecializationTest_LDADD = libtestgencpp.la | 
|  | 161 |  | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 162 |  | 
|  | 163 | # | 
|  | 164 | # Common thrift code generation rules | 
|  | 165 | # | 
|  | 166 | THRIFT = $(top_builddir)/compiler/cpp/thrift | 
|  | 167 |  | 
|  | 168 | gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift | 
|  | 169 | $(THRIFT) --gen cpp:dense $< | 
|  | 170 |  | 
|  | 171 | gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift | 
|  | 172 | $(THRIFT) --gen cpp:dense $< | 
|  | 173 |  | 
|  | 174 | gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift | 
|  | 175 | $(THRIFT) --gen cpp:dense $< | 
|  | 176 |  | 
|  | 177 | 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 | 
|  | 178 | $(THRIFT) --gen cpp:dense $< | 
|  | 179 |  | 
|  | 180 | INCLUDES = \ | 
|  | 181 | -I$(top_srcdir)/lib/cpp/src | 
|  | 182 |  | 
|  | 183 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) | 
| Roger Meier | 3831578 | 2011-11-06 11:29:41 +0000 | [diff] [blame] | 184 | AM_LDFLAGS = $(BOOST_LDFLAGS) | 
| Jake Farrell | ea949fb | 2011-12-13 20:02:33 +0000 | [diff] [blame^] | 185 | AM_CXXFLAGS = -Wall | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 186 |  | 
|  | 187 | clean-local: | 
|  | 188 | $(RM) -r gen-cpp | 
|  | 189 |  | 
|  | 190 | EXTRA_DIST = \ | 
| David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 191 | DenseProtoTest.cpp \ | 
|  | 192 | ThriftTest_extras.cpp \ | 
|  | 193 | DebugProtoTest_extras.cpp |