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