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