| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +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 | # |
| Kevin Wojniak | a392566 | 2019-07-01 11:07:45 -0700 | [diff] [blame] | 19 | AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc |
| Roger Meier | 81a1f99 | 2014-10-22 14:09:43 +0200 | [diff] [blame] | 20 | |
| Nobuaki Sukegawa | a0c5ab7 | 2015-02-01 00:27:12 +0900 | [diff] [blame] | 21 | BUILT_SOURCES = gen-cpp/ThriftTest.cpp \ |
| 22 | gen-cpp/ThriftTest_types.cpp \ |
| 23 | gen-cpp/ThriftTest_constants.cpp \ |
| James E. King, III | 58402ff | 2017-11-17 14:41:46 -0500 | [diff] [blame] | 24 | gen-cpp/SecondService.cpp \ |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 25 | gen-cpp/Service.cpp \ |
| 26 | gen-cpp-forward/ThriftTest_types.cpp \ |
| 27 | gen-cpp-forward/ThriftTest_constants.cpp \ |
| 28 | gen-cpp-private/ThriftTest_types.cpp \ |
| 29 | gen-cpp-private/ThriftTest_constants.cpp \ |
| 30 | gen-cpp-enumclass/ThriftTest_types.cpp \ |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 31 | gen-cpp-enumclass/ThriftTest_constants.cpp \ |
| 32 | gen-cpp-templatestreamop/ThriftTest_types.cpp \ |
| 33 | gen-cpp-templatestreamop/ThriftTest_types.tcc \ |
| 34 | gen-cpp-templatestreamop/ThriftTest_constants.cpp |
| Nobuaki Sukegawa | a0c5ab7 | 2015-02-01 00:27:12 +0900 | [diff] [blame] | 35 | |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 36 | noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la |
| 37 | nodist_libtestgencpp_la_SOURCES = \ |
| James E. King, III | 58402ff | 2017-11-17 14:41:46 -0500 | [diff] [blame] | 38 | gen-cpp/SecondService.cpp \ |
| 39 | gen-cpp/SecondService.h \ |
| 40 | gen-cpp/SecondService.tcc \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 41 | gen-cpp/ThriftTest_constants.cpp \ |
| 42 | gen-cpp/ThriftTest_constants.h \ |
| 43 | gen-cpp/ThriftTest_types.cpp \ |
| 44 | gen-cpp/ThriftTest_types.h \ |
| 45 | gen-cpp/ThriftTest_types.tcc \ |
| 46 | gen-cpp/ThriftTest.cpp \ |
| 47 | gen-cpp/ThriftTest.h \ |
| 48 | gen-cpp/ThriftTest.tcc \ |
| 49 | src/ThriftTest_extras.cpp |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 50 | |
| 51 | libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 52 | |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 53 | # Libraries for option-specific tests |
| 54 | noinst_LTLIBRARIES += \ |
| 55 | libforwardsettertestgencpp.la \ |
| 56 | libprivateoptonaltestgencpp.la \ |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 57 | libenumclasstestgencpp.la \ |
| 58 | libtemplatestreamoptestgencpp.la |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 59 | |
| 60 | nodist_libforwardsettertestgencpp_la_SOURCES = \ |
| 61 | gen-cpp-forward/ThriftTest_types.cpp \ |
| 62 | gen-cpp-forward/ThriftTest_types.h \ |
| 63 | gen-cpp-forward/ThriftTest_types.tcc \ |
| 64 | gen-cpp-forward/ThriftTest_constants.cpp \ |
| 65 | gen-cpp-forward/ThriftTest_constants.h \ |
| 66 | src/ThriftTest_extras.cpp |
| 67 | |
| 68 | libforwardsettertestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 69 | |
| 70 | nodist_libprivateoptonaltestgencpp_la_SOURCES = \ |
| 71 | gen-cpp-private/ThriftTest_types.cpp \ |
| 72 | gen-cpp-private/ThriftTest_types.h \ |
| 73 | gen-cpp-private/ThriftTest_constants.cpp \ |
| 74 | gen-cpp-private/ThriftTest_constants.h \ |
| 75 | src/ThriftTest_extras.cpp |
| 76 | |
| 77 | libprivateoptonaltestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 78 | |
| 79 | nodist_libenumclasstestgencpp_la_SOURCES = \ |
| 80 | gen-cpp-enumclass/ThriftTest_types.cpp \ |
| 81 | gen-cpp-enumclass/ThriftTest_types.h \ |
| 82 | gen-cpp-enumclass/ThriftTest_constants.cpp \ |
| 83 | gen-cpp-enumclass/ThriftTest_constants.h \ |
| 84 | src/ThriftTest_extras.cpp |
| 85 | |
| 86 | libenumclasstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 87 | |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 88 | nodist_libtemplatestreamoptestgencpp_la_SOURCES = \ |
| 89 | gen-cpp-templatestreamop/ThriftTest_types.cpp \ |
| 90 | gen-cpp-templatestreamop/ThriftTest_types.h \ |
| 91 | gen-cpp-templatestreamop/ThriftTest_types.tcc \ |
| 92 | gen-cpp-templatestreamop/ThriftTest_constants.cpp \ |
| 93 | gen-cpp-templatestreamop/ThriftTest_constants.h \ |
| 94 | src/ThriftTest_extras.cpp |
| 95 | |
| 96 | libtemplatestreamoptestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 97 | |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 98 | nodist_libstresstestgencpp_la_SOURCES = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 99 | gen-cpp/StressTest_types.h \ |
| 100 | gen-cpp/Service.cpp \ |
| 101 | gen-cpp/Service.h |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 102 | |
| 103 | libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 104 | |
| Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 105 | precross: TestServer TestClient |
| 106 | |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 107 | check_PROGRAMS = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 108 | TestServer \ |
| 109 | TestClient \ |
| 110 | StressTest \ |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 111 | StressTestNonBlocking \ |
| 112 | ForwardSetterTest \ |
| 113 | PrivateOptionalTest \ |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 114 | EnumClassTest \ |
| 115 | TemplateStreamOpTest |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 116 | |
| 117 | # we currently do not run the testsuite, stop c++ server issue |
| 118 | # TESTS = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 119 | # $(check_PROGRAMS) |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 120 | |
| 121 | TestServer_SOURCES = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 122 | src/TestServer.cpp |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 123 | |
| 124 | TestServer_LDADD = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 125 | libtestgencpp.la \ |
| 126 | $(top_builddir)/lib/cpp/libthrift.la \ |
| 127 | $(top_builddir)/lib/cpp/libthriftz.la \ |
| 128 | $(top_builddir)/lib/cpp/libthriftnb.la \ |
| Dave Watson | 792db4e | 2015-01-16 11:22:01 -0800 | [diff] [blame] | 129 | -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS) |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 130 | |
| 131 | TestClient_SOURCES = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 132 | src/TestClient.cpp |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 133 | |
| 134 | TestClient_LDADD = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 135 | libtestgencpp.la \ |
| 136 | $(top_builddir)/lib/cpp/libthrift.la \ |
| 137 | $(top_builddir)/lib/cpp/libthriftz.la \ |
| 138 | $(top_builddir)/lib/cpp/libthriftnb.la \ |
| Dave Watson | 792db4e | 2015-01-16 11:22:01 -0800 | [diff] [blame] | 139 | -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS) |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 140 | |
| 141 | StressTest_SOURCES = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 142 | src/StressTest.cpp |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 143 | |
| 144 | StressTest_LDADD = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 145 | libstresstestgencpp.la \ |
| 146 | $(top_builddir)/lib/cpp/libthrift.la |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 147 | |
| 148 | StressTestNonBlocking_SOURCES = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 149 | src/StressTestNonBlocking.cpp |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 150 | |
| 151 | StressTestNonBlocking_LDADD = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 152 | libstresstestgencpp.la \ |
| 153 | $(top_builddir)/lib/cpp/libthriftnb.la \ |
| 154 | -levent |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 155 | |
| 156 | ForwardSetterTest_SOURCES = \ |
| 157 | src/ForwardSetterTest.cpp |
| 158 | |
| 159 | ForwardSetterTest_CPPFLAGS = -Igen-cpp-forward $(AM_CPPFLAGS) |
| 160 | ForwardSetterTest_LDADD = \ |
| 161 | libforwardsettertestgencpp.la \ |
| 162 | $(top_builddir)/lib/cpp/libthrift.la |
| 163 | |
| 164 | PrivateOptionalTest_SOURCES = \ |
| 165 | src/PrivateOptionalTest.cpp |
| 166 | |
| 167 | PrivateOptionalTest_CPPFLAGS = -Igen-cpp-private $(AM_CPPFLAGS) |
| 168 | PrivateOptionalTest_LDADD = \ |
| 169 | libprivateoptonaltestgencpp.la \ |
| 170 | $(top_builddir)/lib/cpp/libthrift.la |
| 171 | |
| 172 | EnumClassTest_SOURCES = \ |
| 173 | src/EnumClassTest.cpp |
| 174 | |
| 175 | EnumClassTest_CPPFLAGS = -Igen-cpp-enumclass $(AM_CPPFLAGS) |
| 176 | EnumClassTest_LDADD = \ |
| 177 | libenumclasstestgencpp.la \ |
| 178 | $(top_builddir)/lib/cpp/libthrift.la |
| 179 | |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 180 | TemplateStreamOpTest_SOURCES = \ |
| 181 | src/TemplateStreamOpTest.cpp |
| 182 | |
| 183 | TemplateStreamOpTest_CPPFLAGS = -Igen-cpp-templatestreamop $(AM_CPPFLAGS) |
| 184 | TemplateStreamOpTest_LDADD = \ |
| 185 | libtemplatestreamoptestgencpp.la \ |
| 186 | $(top_builddir)/lib/cpp/libthrift.la |
| 187 | |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 188 | # |
| 189 | # Common thrift code generation rules |
| 190 | # |
| Carel Combrink | fbe685a | 2025-06-05 08:38:07 +0200 | [diff] [blame] | 191 | gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/SecondService.tcc: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 192 | $(THRIFT) --gen cpp:templates,cob_style -r $< |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 193 | |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 194 | # Generate ThriftTest with forward_setter option |
| 195 | gen-cpp-forward/ThriftTest_types.cpp gen-cpp-forward/ThriftTest_types.h gen-cpp-forward/ThriftTest_types.tcc gen-cpp-forward/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) |
| 196 | $(MKDIR_P) gen-cpp-forward |
| 197 | $(THRIFT) --gen cpp:moveable_types=forward_setter -out gen-cpp-forward $< |
| 198 | |
| 199 | # Generate ThriftTest with private_optional option |
| 200 | gen-cpp-private/ThriftTest_types.cpp gen-cpp-private/ThriftTest_types.h gen-cpp-private/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) |
| 201 | $(MKDIR_P) gen-cpp-private |
| 202 | $(THRIFT) --gen cpp:private_optional -out gen-cpp-private $< |
| 203 | |
| 204 | # Generate ThriftTest with enum_class option |
| 205 | gen-cpp-enumclass/ThriftTest_types.cpp gen-cpp-enumclass/ThriftTest_types.h gen-cpp-enumclass/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) |
| 206 | $(MKDIR_P) gen-cpp-enumclass |
| 207 | $(THRIFT) --gen cpp:pure_enums=enum_class -out gen-cpp-enumclass $< |
| 208 | |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 209 | # Generate ThriftTest with template_streamop option |
| 210 | gen-cpp-templatestreamop/ThriftTest_types.cpp gen-cpp-templatestreamop/ThriftTest_types.h gen-cpp-templatestreamop/ThriftTest_types.tcc gen-cpp-templatestreamop/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT) |
| 211 | $(MKDIR_P) gen-cpp-templatestreamop |
| 212 | $(THRIFT) --gen cpp:template_streamop -out gen-cpp-templatestreamop $< |
| 213 | |
| zeshuai007 | 57c2507 | 2020-04-09 11:17:05 +0800 | [diff] [blame] | 214 | gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT) |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 215 | $(THRIFT) --gen cpp $< |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 216 | |
| Zezeng Wang | 371d92f | 2020-04-28 14:23:15 +0800 | [diff] [blame] | 217 | gen-cpp/SpecificNameTest_types.cpp gen-cpp/EchoService.cpp: $(top_srcdir)/test/SpecificName.thrift $(THRIFT) |
| 218 | $(THRIFT) --gen cpp $< |
| 219 | |
| Kevin Wojniak | a392566 | 2019-07-01 11:07:45 -0700 | [diff] [blame] | 220 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp -I. |
| James E. King, III | d7142b7 | 2017-09-01 13:00:36 -0700 | [diff] [blame] | 221 | AM_CXXFLAGS = -Wall -Wextra -pedantic -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS |
| Roger Meier | 051ea1c | 2014-12-20 22:43:24 +0100 | [diff] [blame] | 222 | AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) $(ZLIB_LIBS) |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 223 | |
| 224 | clean-local: |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 225 | $(RM) -r gen-cpp/ gen-cpp-forward/ gen-cpp-private/ gen-cpp-enumclass/ gen-cpp-templatestreamop/ |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 226 | |
| Konrad Grochowski | 16a23a6 | 2014-11-13 15:33:38 +0100 | [diff] [blame] | 227 | style-local: |
| 228 | $(CPPSTYLE_CMD) |
| 229 | |
| Thomas | 63f0458 | 2024-03-21 22:51:07 +0900 | [diff] [blame] | 230 | distdir: |
| 231 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
| 232 | |
| Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 233 | EXTRA_DIST = \ |
| Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 234 | src/TestClient.cpp \ |
| 235 | src/TestServer.cpp \ |
| 236 | src/StressTest.cpp \ |
| Copilot | 1e09a04 | 2026-01-29 10:36:28 -0800 | [diff] [blame] | 237 | src/StressTestNonBlocking.cpp \ |
| 238 | src/ForwardSetterTest.cpp \ |
| 239 | src/PrivateOptionalTest.cpp \ |
| copilot-swe-agent[bot] | c3cdacf | 2026-02-09 21:30:16 +0000 | [diff] [blame^] | 240 | src/EnumClassTest.cpp \ |
| 241 | src/TemplateStreamOpTest.cpp |