blob: 74b0a090bdfd6a5a118aca0e18633458557dd67f [file] [log] [blame]
Pascal Bachd5f87e12014-12-12 15:59:17 +01001#
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
Nobuaki Sukegawac444fb52015-01-02 23:16:55 +090020include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
Pascal Bachd5f87e12014-12-12 15:59:17 +010021
James E. King, III7edc8fa2017-01-20 10:11:41 -050022add_definitions("-D__STDC_LIMIT_MACROS")
23
24if (WITH_DYN_LINK_TEST)
25 add_definitions( -DBOOST_TEST_DYN_LINK )
26endif()
27
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
33 gen-cpp/DebugProtoTest_types.cpp
34 gen-cpp/DebugProtoTest_types.h
35 gen-cpp/EnumTest_types.cpp
36 gen-cpp/EnumTest_types.h
37 gen-cpp/OptionalRequiredTest_types.cpp
38 gen-cpp/OptionalRequiredTest_types.h
39 gen-cpp/Recursive_types.cpp
40 gen-cpp/Recursive_types.h
41 gen-cpp/ThriftTest_types.cpp
42 gen-cpp/ThriftTest_types.h
43 gen-cpp/TypedefTest_types.cpp
44 gen-cpp/TypedefTest_types.h
45 ThriftTest_extras.cpp
46 DebugProtoTest_extras.cpp
47)
48
49add_library(testgencpp STATIC ${testgencpp_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010050
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090051set(testgencpp_cob_SOURCES
Pascal Bachd5f87e12014-12-12 15:59:17 +010052 gen-cpp/ChildService.cpp
53 gen-cpp/ChildService.h
Ben Craig1684c422015-04-24 08:52:44 -050054 gen-cpp/EmptyService.cpp
55 gen-cpp/EmptyService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010056 gen-cpp/ParentService.cpp
57 gen-cpp/ParentService.h
58 gen-cpp/proc_types.cpp
59 gen-cpp/proc_types.h
60)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090061add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010062
Pascal Bachd5f87e12014-12-12 15:59:17 +010063add_executable(Benchmark Benchmark.cpp)
64target_link_libraries(Benchmark testgencpp)
Jim King9de9b1f2015-04-30 16:03:34 -040065LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010066add_test(NAME Benchmark COMMAND Benchmark)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090067target_link_libraries(Benchmark testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +010068
69set(UnitTest_SOURCES
70 UnitTestMain.cpp
71 TMemoryBufferTest.cpp
72 TBufferBaseTest.cpp
73 Base64Test.cpp
74 ToStringTest.cpp
75 TypedefTest.cpp
Roger Meier3815e0b2015-04-04 16:26:30 +020076 TServerSocketTest.cpp
Ben Craig1684c422015-04-24 08:52:44 -050077 TServerTransportTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010078)
79
Roger Meiera6b66332015-05-15 15:21:50 +020080if(NOT WITH_BOOSTTHREADS AND NOT WITH_STDTHREADS AND NOT MSVC)
Pascal Bachd5f87e12014-12-12 15:59:17 +010081 list(APPEND UnitTest_SOURCES RWMutexStarveTest.cpp)
82endif()
83
84add_executable(UnitTests ${UnitTest_SOURCES})
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090085target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
Jim King9de9b1f2015-04-30 16:03:34 -040086LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010087add_test(NAME UnitTests COMMAND UnitTests)
ben-craigfae08e72015-07-15 11:34:47 -050088if ( MSVC )
89 # Disable C4503: decorated name length exceeded, name was truncated
90 # 'insanity' results in very long decorated names
91 set_property( TARGET UnitTests APPEND_STRING PROPERTY COMPILE_FLAGS /wd4503 )
92endif ( MSVC )
Pascal Bachd5f87e12014-12-12 15:59:17 +010093
ben-craigaf2d9c82015-07-16 08:11:21 -050094
Martin Haimberger0ad6ee92015-11-13 03:18:50 -080095set( TInterruptTest_SOURCES
96 TSocketInterruptTest.cpp
97 TSSLSocketInterruptTest.cpp
98)
ben-craigaf2d9c82015-07-16 08:11:21 -050099if (WIN32)
100 list(APPEND TInterruptTest_SOURCES
101 TPipeInterruptTest.cpp
102 )
103endif()
104add_executable(TInterruptTest ${TInterruptTest_SOURCES})
105target_link_libraries(TInterruptTest
Ben Craig1684c422015-04-24 08:52:44 -0500106 testgencpp
107 ${Boost_LIBRARIES}
Ben Craig1684c422015-04-24 08:52:44 -0500108)
ben-craigaf2d9c82015-07-16 08:11:21 -0500109LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100110if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
ben-craigaf2d9c82015-07-16 08:11:21 -0500111target_link_libraries(TInterruptTest -lrt)
Ben Craig1684c422015-04-24 08:52:44 -0500112endif ()
Martin Haimberger0ad6ee92015-11-13 03:18:50 -0800113add_test(NAME TInterruptTest COMMAND TInterruptTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Ben Craig1684c422015-04-24 08:52:44 -0500114
115add_executable(TServerIntegrationTest TServerIntegrationTest.cpp)
116target_link_libraries(TServerIntegrationTest
117 testgencpp_cob
118 ${Boost_LIBRARIES}
119)
Jim King9de9b1f2015-04-30 16:03:34 -0400120LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100121if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Ben Craig1684c422015-04-24 08:52:44 -0500122target_link_libraries(TServerIntegrationTest -lrt)
123endif ()
124add_test(NAME TServerIntegrationTest COMMAND TServerIntegrationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100125
126if(WITH_ZLIB)
Nobuaki Sukegawa3e5b9c22016-02-22 21:47:23 +0900127include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
Pascal Bachd5f87e12014-12-12 15:59:17 +0100128add_executable(TransportTest TransportTest.cpp)
129target_link_libraries(TransportTest
130 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100131 ${Boost_LIBRARIES}
132 ${ZLIB_LIBRARIES}
133)
Jim King9de9b1f2015-04-30 16:03:34 -0400134LINK_AGAINST_THRIFT_LIBRARY(TransportTest thrift)
135LINK_AGAINST_THRIFT_LIBRARY(TransportTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100136add_test(NAME TransportTest COMMAND TransportTest)
137
138add_executable(ZlibTest ZlibTest.cpp)
139target_link_libraries(ZlibTest
140 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100141 ${Boost_LIBRARIES}
142 ${ZLIB_LIBRARIES}
143)
Jim King9de9b1f2015-04-30 16:03:34 -0400144LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thrift)
145LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100146add_test(NAME ZlibTest COMMAND ZlibTest)
147endif(WITH_ZLIB)
148
149
150add_executable(EnumTest EnumTest.cpp)
151target_link_libraries(EnumTest
152 testgencpp
153 ${Boost_LIBRARIES}
154)
Jim King9de9b1f2015-04-30 16:03:34 -0400155LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100156add_test(NAME EnumTest COMMAND EnumTest)
157
Jim King9de9b1f2015-04-30 16:03:34 -0400158if(HAVE_GETOPT_H)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100159add_executable(TFileTransportTest TFileTransportTest.cpp)
160target_link_libraries(TFileTransportTest
161 testgencpp
162 ${Boost_LIBRARIES}
163)
Jim King9de9b1f2015-04-30 16:03:34 -0400164LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100165add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400166endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100167
168add_executable(TFDTransportTest TFDTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200169target_link_libraries(TFDTransportTest
170 ${Boost_LIBRARIES}
171)
Jim King9de9b1f2015-04-30 16:03:34 -0400172LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100173add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
174
175add_executable(TPipedTransportTest TPipedTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200176target_link_libraries(TPipedTransportTest
177 ${Boost_LIBRARIES}
178)
Jim King9de9b1f2015-04-30 16:03:34 -0400179LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100180add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
181
182set(AllProtocolsTest_SOURCES
183 AllProtocolTests.cpp
184 AllProtocolTests.tcc
185 GenericHelpers
186 )
187
188add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
Claudius Heine5ef662b2015-06-24 10:03:50 +0200189target_link_libraries(AllProtocolsTest
190 testgencpp
191 ${Boost_LIBRARIES}
192)
Jim King9de9b1f2015-04-30 16:03:34 -0400193LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100194add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
195
Jim King9de9b1f2015-04-30 16:03:34 -0400196# The debug run-time in Windows asserts on isprint() with negative inputs
197if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
Pascal Bachd5f87e12014-12-12 15:59:17 +0100198add_executable(DebugProtoTest DebugProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200199target_link_libraries(DebugProtoTest
200 testgencpp
201 ${Boost_LIBRARIES}
202)
Jim King9de9b1f2015-04-30 16:03:34 -0400203LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100204add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400205endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100206
207add_executable(JSONProtoTest JSONProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200208target_link_libraries(JSONProtoTest
209 testgencpp
210 ${Boost_LIBRARIES}
211)
Jim King9de9b1f2015-04-30 16:03:34 -0400212LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100213add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
214
215add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200216target_link_libraries(OptionalRequiredTest
217 testgencpp
218 ${Boost_LIBRARIES}
219)
Jim King9de9b1f2015-04-30 16:03:34 -0400220LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100221add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
222
223add_executable(RecursiveTest RecursiveTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200224target_link_libraries(RecursiveTest
225 testgencpp
226 ${Boost_LIBRARIES}
227)
Jim King9de9b1f2015-04-30 16:03:34 -0400228LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100229add_test(NAME RecursiveTest COMMAND RecursiveTest)
230
231add_executable(SpecializationTest SpecializationTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200232target_link_libraries(SpecializationTest
233 testgencpp
234 ${Boost_LIBRARIES}
235)
Jim King9de9b1f2015-04-30 16:03:34 -0400236LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100237add_test(NAME SpecializationTest COMMAND SpecializationTest)
238
239set(concurrency_test_SOURCES
240 concurrency/Tests.cpp
241 concurrency/ThreadFactoryTests.h
242 concurrency/ThreadManagerTests.h
243 concurrency/TimerManagerTests.h
244)
245add_executable(concurrency_test ${concurrency_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400246LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100247add_test(NAME concurrency_test COMMAND concurrency_test)
248
249set(link_test_SOURCES
250 link/LinkTest.cpp
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900251 gen-cpp/ParentService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +0100252 link/TemplatedService1.cpp
253 link/TemplatedService2.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100254)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900255
Pascal Bachd5f87e12014-12-12 15:59:17 +0100256add_executable(link_test ${link_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400257target_link_libraries(link_test testgencpp_cob)
258LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +0900259target_link_libraries(link_test testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100260add_test(NAME link_test COMMAND link_test)
261
262if(WITH_LIBEVENT)
263set(processor_test_SOURCES
264 processor/ProcessorTest.cpp
265 processor/EventLog.cpp
266 processor/ServerThread.cpp
267 processor/EventLog.h
268 processor/Handlers.h
269 processor/ServerThread.h
270)
271add_executable(processor_test ${processor_test_SOURCES})
272target_link_libraries(processor_test
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900273 testgencpp_cob
Pascal Bachd5f87e12014-12-12 15:59:17 +0100274 ${Boost_LIBRARIES}
275)
Jim King9de9b1f2015-04-30 16:03:34 -0400276LINK_AGAINST_THRIFT_LIBRARY(processor_test thrift)
277LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100278add_test(NAME processor_test COMMAND processor_test)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900279
280set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
281add_executable(TNonblockingServerTest ${TNonblockingServerTest_SOURCES})
282include_directories(${LIBEVENT_INCLUDE_DIRS})
283target_link_libraries(TNonblockingServerTest
284 testgencpp_cob
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900285 ${LIBEVENT_LIBRARIES}
286 ${Boost_LIBRARIES}
287)
Jim King9de9b1f2015-04-30 16:03:34 -0400288LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thrift)
289LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900290add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100291endif()
292
293if(OPENSSL_FOUND AND WITH_OPENSSL)
294add_executable(OpenSSLManualInitTest OpenSSLManualInitTest.cpp)
295target_link_libraries(OpenSSLManualInitTest
Pascal Bachd5f87e12014-12-12 15:59:17 +0100296 ${OPENSSL_LIBRARIES}
297 ${Boost_LIBRARIES}
298)
Jim King9de9b1f2015-04-30 16:03:34 -0400299LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100300add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300301
302add_executable(SecurityTest SecurityTest.cpp)
303target_link_libraries(SecurityTest
304 testgencpp
305 ${Boost_LIBRARIES}
306)
307LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100308if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300309target_link_libraries(SecurityTest -lrt)
310endif ()
311add_test(NAME SecurityTest COMMAND SecurityTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
312
Pascal Bachd5f87e12014-12-12 15:59:17 +0100313endif()
314
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900315if(WITH_QT4)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900316set(CMAKE_AUTOMOC ON)
317find_package(Qt4 REQUIRED COMPONENTS QtTest)
318set(TQTcpServerTest_SOURCES
319 qt/TQTcpServerTest.cpp
320)
321add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400322target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
323LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900324add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
325endif()
326
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900327if(WITH_QT5)
328add_subdirectory(qt)
329endif()
330
Pascal Bachd5f87e12014-12-12 15:59:17 +0100331#
332# Common thrift code generation rules
333#
334
335
Ben Craig1684c422015-04-24 08:52:44 -0500336add_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 +0900337 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/DebugProtoTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100338)
339
340add_custom_command(OUTPUT gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900341 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/EnumTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100342)
343
344add_custom_command(OUTPUT gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900345 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/TypedefTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100346)
347
348add_custom_command(OUTPUT gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900349 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/OptionalRequiredTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100350)
351
352add_custom_command(OUTPUT gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900353 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/Recursive.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100354)
355
356add_custom_command(OUTPUT gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900357 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100358)
359
360add_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 +0900361 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100362)
363
364add_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 +0900365 COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style ${CMAKE_CURRENT_SOURCE_DIR}/processor/proc.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100366)