blob: 48e2fd375ccbe6bc1647dcff8d7fa37a5aa1fbeb [file] [log] [blame]
James E. King III3ae30422018-03-12 07:33:22 -04001#
Pascal Bachd5f87e12014-12-12 15:59:17 +01002# 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
James E. King IIIc9ac8d22019-01-07 16:46:45 -050020# Unit tests still require boost
21include(BoostMacros)
22REQUIRE_BOOST_HEADERS()
23set(BOOST_COMPONENTS chrono date_time filesystem random thread unit_test_framework)
24REQUIRE_BOOST_LIBRARIES(BOOST_COMPONENTS)
Pascal Bachd5f87e12014-12-12 15:59:17 +010025
James E. King IIIc9ac8d22019-01-07 16:46:45 -050026include(ThriftMacros)
James E. King, III7edc8fa2017-01-20 10:11:41 -050027
28# Make sure gen-cpp files can be included
Pascal Bachd5f87e12014-12-12 15:59:17 +010029include_directories("${CMAKE_CURRENT_BINARY_DIR}")
30
31# Create the thrift C++ test library
32set(testgencpp_SOURCES
James E. King, IIIb4c190b2017-02-13 16:39:59 -050033 gen-cpp/AnnotationTest_types.cpp
34 gen-cpp/AnnotationTest_types.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010035 gen-cpp/DebugProtoTest_types.cpp
36 gen-cpp/DebugProtoTest_types.h
37 gen-cpp/EnumTest_types.cpp
38 gen-cpp/EnumTest_types.h
39 gen-cpp/OptionalRequiredTest_types.cpp
40 gen-cpp/OptionalRequiredTest_types.h
41 gen-cpp/Recursive_types.cpp
42 gen-cpp/Recursive_types.h
43 gen-cpp/ThriftTest_types.cpp
44 gen-cpp/ThriftTest_types.h
Chet Murthyad08a8b2017-12-19 15:55:56 -080045 gen-cpp/OneWayTest_types.h
46 gen-cpp/OneWayService.cpp
47 gen-cpp/OneWayService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010048 gen-cpp/TypedefTest_types.cpp
49 gen-cpp/TypedefTest_types.h
50 ThriftTest_extras.cpp
51 DebugProtoTest_extras.cpp
52)
53
54add_library(testgencpp STATIC ${testgencpp_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010055
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090056set(testgencpp_cob_SOURCES
Pascal Bachd5f87e12014-12-12 15:59:17 +010057 gen-cpp/ChildService.cpp
58 gen-cpp/ChildService.h
Ben Craig1684c422015-04-24 08:52:44 -050059 gen-cpp/EmptyService.cpp
60 gen-cpp/EmptyService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010061 gen-cpp/ParentService.cpp
62 gen-cpp/ParentService.h
63 gen-cpp/proc_types.cpp
64 gen-cpp/proc_types.h
65)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090066add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010067
Pascal Bachd5f87e12014-12-12 15:59:17 +010068add_executable(Benchmark Benchmark.cpp)
69target_link_libraries(Benchmark testgencpp)
Jim King9de9b1f2015-04-30 16:03:34 -040070LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010071add_test(NAME Benchmark COMMAND Benchmark)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090072target_link_libraries(Benchmark testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +010073
74set(UnitTest_SOURCES
75 UnitTestMain.cpp
Chet Murthyad08a8b2017-12-19 15:55:56 -080076 OneWayHTTPTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010077 TMemoryBufferTest.cpp
78 TBufferBaseTest.cpp
79 Base64Test.cpp
80 ToStringTest.cpp
81 TypedefTest.cpp
Roger Meier3815e0b2015-04-04 16:26:30 +020082 TServerSocketTest.cpp
Ben Craig1684c422015-04-24 08:52:44 -050083 TServerTransportTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010084)
85
Pascal Bachd5f87e12014-12-12 15:59:17 +010086add_executable(UnitTests ${UnitTest_SOURCES})
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090087target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
Jim King9de9b1f2015-04-30 16:03:34 -040088LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010089add_test(NAME UnitTests COMMAND UnitTests)
ben-craigfae08e72015-07-15 11:34:47 -050090if ( MSVC )
91 # Disable C4503: decorated name length exceeded, name was truncated
92 # 'insanity' results in very long decorated names
93 set_property( TARGET UnitTests APPEND_STRING PROPERTY COMPILE_FLAGS /wd4503 )
94endif ( MSVC )
Pascal Bachd5f87e12014-12-12 15:59:17 +010095
ben-craigaf2d9c82015-07-16 08:11:21 -050096
Martin Haimberger0ad6ee92015-11-13 03:18:50 -080097set( TInterruptTest_SOURCES
98 TSocketInterruptTest.cpp
99 TSSLSocketInterruptTest.cpp
100)
ben-craigaf2d9c82015-07-16 08:11:21 -0500101if (WIN32)
102 list(APPEND TInterruptTest_SOURCES
103 TPipeInterruptTest.cpp
104 )
105endif()
106add_executable(TInterruptTest ${TInterruptTest_SOURCES})
107target_link_libraries(TInterruptTest
Ben Craig1684c422015-04-24 08:52:44 -0500108 testgencpp
109 ${Boost_LIBRARIES}
Ben Craig1684c422015-04-24 08:52:44 -0500110)
ben-craigaf2d9c82015-07-16 08:11:21 -0500111LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100112if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
ben-craigaf2d9c82015-07-16 08:11:21 -0500113target_link_libraries(TInterruptTest -lrt)
Ben Craig1684c422015-04-24 08:52:44 -0500114endif ()
James E. King, III07f59972017-03-10 06:18:33 -0500115add_test(NAME TInterruptTest COMMAND TInterruptTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Ben Craig1684c422015-04-24 08:52:44 -0500116
117add_executable(TServerIntegrationTest TServerIntegrationTest.cpp)
118target_link_libraries(TServerIntegrationTest
119 testgencpp_cob
120 ${Boost_LIBRARIES}
121)
Jim King9de9b1f2015-04-30 16:03:34 -0400122LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100123if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Ben Craig1684c422015-04-24 08:52:44 -0500124target_link_libraries(TServerIntegrationTest -lrt)
125endif ()
126add_test(NAME TServerIntegrationTest COMMAND TServerIntegrationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100127
128if(WITH_ZLIB)
Nobuaki Sukegawa3e5b9c22016-02-22 21:47:23 +0900129include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
Pascal Bachd5f87e12014-12-12 15:59:17 +0100130add_executable(TransportTest TransportTest.cpp)
131target_link_libraries(TransportTest
132 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100133 ${Boost_LIBRARIES}
134 ${ZLIB_LIBRARIES}
135)
Jim King9de9b1f2015-04-30 16:03:34 -0400136LINK_AGAINST_THRIFT_LIBRARY(TransportTest thrift)
137LINK_AGAINST_THRIFT_LIBRARY(TransportTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100138add_test(NAME TransportTest COMMAND TransportTest)
139
140add_executable(ZlibTest ZlibTest.cpp)
141target_link_libraries(ZlibTest
142 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100143 ${Boost_LIBRARIES}
144 ${ZLIB_LIBRARIES}
145)
Jim King9de9b1f2015-04-30 16:03:34 -0400146LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thrift)
147LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100148add_test(NAME ZlibTest COMMAND ZlibTest)
149endif(WITH_ZLIB)
150
James E. King, IIIb4c190b2017-02-13 16:39:59 -0500151add_executable(AnnotationTest AnnotationTest.cpp)
152target_link_libraries(AnnotationTest
153 testgencpp
154 ${Boost_LIBRARIES}
155)
156LINK_AGAINST_THRIFT_LIBRARY(AnnotationTest thrift)
157add_test(NAME AnnotationTest COMMAND AnnotationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100158
159add_executable(EnumTest EnumTest.cpp)
160target_link_libraries(EnumTest
161 testgencpp
162 ${Boost_LIBRARIES}
163)
Jim King9de9b1f2015-04-30 16:03:34 -0400164LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100165add_test(NAME EnumTest COMMAND EnumTest)
166
Jim King9de9b1f2015-04-30 16:03:34 -0400167if(HAVE_GETOPT_H)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100168add_executable(TFileTransportTest TFileTransportTest.cpp)
169target_link_libraries(TFileTransportTest
170 testgencpp
171 ${Boost_LIBRARIES}
172)
Jim King9de9b1f2015-04-30 16:03:34 -0400173LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100174add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400175endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100176
177add_executable(TFDTransportTest TFDTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200178target_link_libraries(TFDTransportTest
179 ${Boost_LIBRARIES}
180)
Jim King9de9b1f2015-04-30 16:03:34 -0400181LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100182add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
183
184add_executable(TPipedTransportTest TPipedTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200185target_link_libraries(TPipedTransportTest
186 ${Boost_LIBRARIES}
187)
Jim King9de9b1f2015-04-30 16:03:34 -0400188LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100189add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
190
191set(AllProtocolsTest_SOURCES
192 AllProtocolTests.cpp
193 AllProtocolTests.tcc
194 GenericHelpers
195 )
196
197add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
Claudius Heine5ef662b2015-06-24 10:03:50 +0200198target_link_libraries(AllProtocolsTest
199 testgencpp
200 ${Boost_LIBRARIES}
201)
Jim King9de9b1f2015-04-30 16:03:34 -0400202LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100203add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
204
Jim King9de9b1f2015-04-30 16:03:34 -0400205# The debug run-time in Windows asserts on isprint() with negative inputs
206if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
Pascal Bachd5f87e12014-12-12 15:59:17 +0100207add_executable(DebugProtoTest DebugProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200208target_link_libraries(DebugProtoTest
209 testgencpp
210 ${Boost_LIBRARIES}
211)
Jim King9de9b1f2015-04-30 16:03:34 -0400212LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100213add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400214endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100215
216add_executable(JSONProtoTest JSONProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200217target_link_libraries(JSONProtoTest
218 testgencpp
219 ${Boost_LIBRARIES}
220)
Jim King9de9b1f2015-04-30 16:03:34 -0400221LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100222add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
223
224add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200225target_link_libraries(OptionalRequiredTest
226 testgencpp
227 ${Boost_LIBRARIES}
228)
Jim King9de9b1f2015-04-30 16:03:34 -0400229LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100230add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
231
232add_executable(RecursiveTest RecursiveTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200233target_link_libraries(RecursiveTest
234 testgencpp
235 ${Boost_LIBRARIES}
236)
Jim King9de9b1f2015-04-30 16:03:34 -0400237LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100238add_test(NAME RecursiveTest COMMAND RecursiveTest)
239
240add_executable(SpecializationTest SpecializationTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200241target_link_libraries(SpecializationTest
242 testgencpp
243 ${Boost_LIBRARIES}
244)
Jim King9de9b1f2015-04-30 16:03:34 -0400245LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100246add_test(NAME SpecializationTest COMMAND SpecializationTest)
247
248set(concurrency_test_SOURCES
249 concurrency/Tests.cpp
250 concurrency/ThreadFactoryTests.h
251 concurrency/ThreadManagerTests.h
252 concurrency/TimerManagerTests.h
253)
254add_executable(concurrency_test ${concurrency_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400255LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100256add_test(NAME concurrency_test COMMAND concurrency_test)
257
258set(link_test_SOURCES
259 link/LinkTest.cpp
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900260 gen-cpp/ParentService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +0100261 link/TemplatedService1.cpp
262 link/TemplatedService2.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100263)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900264
Pascal Bachd5f87e12014-12-12 15:59:17 +0100265add_executable(link_test ${link_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400266target_link_libraries(link_test testgencpp_cob)
267LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +0900268target_link_libraries(link_test testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100269add_test(NAME link_test COMMAND link_test)
270
271if(WITH_LIBEVENT)
272set(processor_test_SOURCES
273 processor/ProcessorTest.cpp
274 processor/EventLog.cpp
275 processor/ServerThread.cpp
276 processor/EventLog.h
277 processor/Handlers.h
278 processor/ServerThread.h
279)
280add_executable(processor_test ${processor_test_SOURCES})
281target_link_libraries(processor_test
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900282 testgencpp_cob
Pascal Bachd5f87e12014-12-12 15:59:17 +0100283 ${Boost_LIBRARIES}
284)
Jim King9de9b1f2015-04-30 16:03:34 -0400285LINK_AGAINST_THRIFT_LIBRARY(processor_test thrift)
286LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100287add_test(NAME processor_test COMMAND processor_test)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900288
289set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
290add_executable(TNonblockingServerTest ${TNonblockingServerTest_SOURCES})
291include_directories(${LIBEVENT_INCLUDE_DIRS})
292target_link_libraries(TNonblockingServerTest
293 testgencpp_cob
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900294 ${LIBEVENT_LIBRARIES}
295 ${Boost_LIBRARIES}
296)
Jim King9de9b1f2015-04-30 16:03:34 -0400297LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thrift)
298LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900299add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
James E. King, III82ae9572017-08-05 12:23:54 -0400300
301if(OPENSSL_FOUND AND WITH_OPENSSL)
302 set(TNonblockingSSLServerTest_SOURCES TNonblockingSSLServerTest.cpp)
303 add_executable(TNonblockingSSLServerTest ${TNonblockingSSLServerTest_SOURCES})
304 include_directories(${LIBEVENT_INCLUDE_DIRS})
305 target_link_libraries(TNonblockingSSLServerTest
306 testgencpp_cob
307 ${LIBEVENT_LIBRARIES}
308 ${Boost_LIBRARIES}
309 )
310 LINK_AGAINST_THRIFT_LIBRARY(TNonblockingSSLServerTest thrift)
311 LINK_AGAINST_THRIFT_LIBRARY(TNonblockingSSLServerTest thriftnb)
312 add_test(NAME TNonblockingSSLServerTest COMMAND TNonblockingSSLServerTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
313endif(OPENSSL_FOUND AND WITH_OPENSSL)
314endif(WITH_LIBEVENT)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100315
316if(OPENSSL_FOUND AND WITH_OPENSSL)
317add_executable(OpenSSLManualInitTest OpenSSLManualInitTest.cpp)
318target_link_libraries(OpenSSLManualInitTest
Pascal Bachd5f87e12014-12-12 15:59:17 +0100319 ${OPENSSL_LIBRARIES}
320 ${Boost_LIBRARIES}
321)
Jim King9de9b1f2015-04-30 16:03:34 -0400322LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100323add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300324
325add_executable(SecurityTest SecurityTest.cpp)
326target_link_libraries(SecurityTest
327 testgencpp
328 ${Boost_LIBRARIES}
329)
330LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100331if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300332target_link_libraries(SecurityTest -lrt)
333endif ()
James E. King, III07f59972017-03-10 06:18:33 -0500334add_test(NAME SecurityTest COMMAND SecurityTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300335
Mario Emmenlauer0f14e2f2019-10-15 11:25:10 +0200336add_executable(SecurityFromBufferTest SecurityFromBufferTest.cpp)
337target_link_libraries(SecurityFromBufferTest
338 testgencpp
339 ${Boost_LIBRARIES}
340)
341LINK_AGAINST_THRIFT_LIBRARY(SecurityFromBufferTest thrift)
342if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
343target_link_libraries(SecurityFromBufferTest -lrt)
344endif ()
345add_test(NAME SecurityFromBufferTest COMMAND SecurityFromBufferTest -- "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
346
Pascal Bachd5f87e12014-12-12 15:59:17 +0100347endif()
348
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900349if(WITH_QT5)
350add_subdirectory(qt)
351endif()
352
Pascal Bachd5f87e12014-12-12 15:59:17 +0100353#
354# Common thrift code generation rules
355#
356
James E. King, IIIb4c190b2017-02-13 16:39:59 -0500357add_custom_command(OUTPUT gen-cpp/AnnotationTest_constants.cpp
358 gen-cpp/AnnotationTest_constants.h
359 gen-cpp/AnnotationTest_types.cpp
360 gen-cpp/AnnotationTest_types.h
361 gen-cpp/foo_service.cpp
362 gen-cpp/foo_service.h
363 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/AnnotationTest.thrift
364)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100365
James E. King, IIIb4c190b2017-02-13 16:39:59 -0500366add_custom_command(OUTPUT gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900367 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/DebugProtoTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100368)
369
370add_custom_command(OUTPUT gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900371 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/EnumTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100372)
373
374add_custom_command(OUTPUT gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900375 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/TypedefTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100376)
377
378add_custom_command(OUTPUT gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900379 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/OptionalRequiredTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100380)
381
382add_custom_command(OUTPUT gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900383 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/Recursive.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100384)
385
386add_custom_command(OUTPUT gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900387 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100388)
389
390add_custom_command(OUTPUT gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900391 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100392)
393
zeshuai00757c25072020-04-09 11:17:05 +0800394add_custom_command(OUTPUT gen-cpp/OneWayService.cpp gen-cpp/OneWayTest_types.h gen-cpp/OneWayService.h
Chet Murthyad08a8b2017-12-19 15:55:56 -0800395 COMMAND ${THRIFT_COMPILER} --gen cpp ${CMAKE_CURRENT_SOURCE_DIR}/OneWayTest.thrift
396)
397
Pascal Bachd5f87e12014-12-12 15:59:17 +0100398add_custom_command(OUTPUT gen-cpp/ChildService.cpp gen-cpp/ChildService.h gen-cpp/ParentService.cpp gen-cpp/ParentService.h gen-cpp/proc_types.cpp gen-cpp/proc_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900399 COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style ${CMAKE_CURRENT_SOURCE_DIR}/processor/proc.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100400)