blob: cbeff08842ec2b9e62be28de94983698df96c3af [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
22#Make sure gen-cpp files can be included
23include_directories("${CMAKE_CURRENT_BINARY_DIR}")
24
25# Create the thrift C++ test library
26set(testgencpp_SOURCES
27 gen-cpp/DebugProtoTest_types.cpp
28 gen-cpp/DebugProtoTest_types.h
29 gen-cpp/EnumTest_types.cpp
30 gen-cpp/EnumTest_types.h
31 gen-cpp/OptionalRequiredTest_types.cpp
32 gen-cpp/OptionalRequiredTest_types.h
33 gen-cpp/Recursive_types.cpp
34 gen-cpp/Recursive_types.h
35 gen-cpp/ThriftTest_types.cpp
36 gen-cpp/ThriftTest_types.h
37 gen-cpp/TypedefTest_types.cpp
38 gen-cpp/TypedefTest_types.h
39 ThriftTest_extras.cpp
40 DebugProtoTest_extras.cpp
41)
42
43add_library(testgencpp STATIC ${testgencpp_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010044
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090045set(testgencpp_cob_SOURCES
Pascal Bachd5f87e12014-12-12 15:59:17 +010046 gen-cpp/ChildService.cpp
47 gen-cpp/ChildService.h
Ben Craig1684c422015-04-24 08:52:44 -050048 gen-cpp/EmptyService.cpp
49 gen-cpp/EmptyService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010050 gen-cpp/ParentService.cpp
51 gen-cpp/ParentService.h
52 gen-cpp/proc_types.cpp
53 gen-cpp/proc_types.h
54)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090055add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010056
57
58add_executable(Benchmark Benchmark.cpp)
59target_link_libraries(Benchmark testgencpp)
Jim King9de9b1f2015-04-30 16:03:34 -040060LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010061add_test(NAME Benchmark COMMAND Benchmark)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090062target_link_libraries(Benchmark testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +010063
64set(UnitTest_SOURCES
65 UnitTestMain.cpp
66 TMemoryBufferTest.cpp
67 TBufferBaseTest.cpp
68 Base64Test.cpp
69 ToStringTest.cpp
70 TypedefTest.cpp
Roger Meier3815e0b2015-04-04 16:26:30 +020071 TServerSocketTest.cpp
Ben Craig1684c422015-04-24 08:52:44 -050072 TServerTransportTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010073)
74
Roger Meiera6b66332015-05-15 15:21:50 +020075if(NOT WITH_BOOSTTHREADS AND NOT WITH_STDTHREADS AND NOT MSVC)
Pascal Bachd5f87e12014-12-12 15:59:17 +010076 list(APPEND UnitTest_SOURCES RWMutexStarveTest.cpp)
77endif()
78
79add_executable(UnitTests ${UnitTest_SOURCES})
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090080target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
Jim King9de9b1f2015-04-30 16:03:34 -040081LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010082add_test(NAME UnitTests COMMAND UnitTests)
ben-craigfae08e72015-07-15 11:34:47 -050083if ( MSVC )
84 # Disable C4503: decorated name length exceeded, name was truncated
85 # 'insanity' results in very long decorated names
86 set_property( TARGET UnitTests APPEND_STRING PROPERTY COMPILE_FLAGS /wd4503 )
87endif ( MSVC )
Pascal Bachd5f87e12014-12-12 15:59:17 +010088
ben-craigaf2d9c82015-07-16 08:11:21 -050089
Martin Haimberger0ad6ee92015-11-13 03:18:50 -080090set( TInterruptTest_SOURCES
91 TSocketInterruptTest.cpp
92 TSSLSocketInterruptTest.cpp
93)
ben-craigaf2d9c82015-07-16 08:11:21 -050094if (WIN32)
95 list(APPEND TInterruptTest_SOURCES
96 TPipeInterruptTest.cpp
97 )
98endif()
99add_executable(TInterruptTest ${TInterruptTest_SOURCES})
100target_link_libraries(TInterruptTest
Ben Craig1684c422015-04-24 08:52:44 -0500101 testgencpp
102 ${Boost_LIBRARIES}
Ben Craig1684c422015-04-24 08:52:44 -0500103)
ben-craigaf2d9c82015-07-16 08:11:21 -0500104LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100105if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
ben-craigaf2d9c82015-07-16 08:11:21 -0500106target_link_libraries(TInterruptTest -lrt)
Ben Craig1684c422015-04-24 08:52:44 -0500107endif ()
Martin Haimberger0ad6ee92015-11-13 03:18:50 -0800108add_test(NAME TInterruptTest COMMAND TInterruptTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Ben Craig1684c422015-04-24 08:52:44 -0500109
110add_executable(TServerIntegrationTest TServerIntegrationTest.cpp)
111target_link_libraries(TServerIntegrationTest
112 testgencpp_cob
113 ${Boost_LIBRARIES}
114)
Jim King9de9b1f2015-04-30 16:03:34 -0400115LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100116if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Ben Craig1684c422015-04-24 08:52:44 -0500117target_link_libraries(TServerIntegrationTest -lrt)
118endif ()
119add_test(NAME TServerIntegrationTest COMMAND TServerIntegrationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100120
121if(WITH_ZLIB)
Nobuaki Sukegawa3e5b9c22016-02-22 21:47:23 +0900122include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
Pascal Bachd5f87e12014-12-12 15:59:17 +0100123add_executable(TransportTest TransportTest.cpp)
124target_link_libraries(TransportTest
125 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100126 ${Boost_LIBRARIES}
127 ${ZLIB_LIBRARIES}
128)
Jim King9de9b1f2015-04-30 16:03:34 -0400129LINK_AGAINST_THRIFT_LIBRARY(TransportTest thrift)
130LINK_AGAINST_THRIFT_LIBRARY(TransportTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100131add_test(NAME TransportTest COMMAND TransportTest)
132
133add_executable(ZlibTest ZlibTest.cpp)
134target_link_libraries(ZlibTest
135 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100136 ${Boost_LIBRARIES}
137 ${ZLIB_LIBRARIES}
138)
Jim King9de9b1f2015-04-30 16:03:34 -0400139LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thrift)
140LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100141add_test(NAME ZlibTest COMMAND ZlibTest)
142endif(WITH_ZLIB)
143
144
145add_executable(EnumTest EnumTest.cpp)
146target_link_libraries(EnumTest
147 testgencpp
148 ${Boost_LIBRARIES}
149)
Jim King9de9b1f2015-04-30 16:03:34 -0400150LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100151add_test(NAME EnumTest COMMAND EnumTest)
152
Jim King9de9b1f2015-04-30 16:03:34 -0400153if(HAVE_GETOPT_H)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100154add_executable(TFileTransportTest TFileTransportTest.cpp)
155target_link_libraries(TFileTransportTest
156 testgencpp
157 ${Boost_LIBRARIES}
158)
Jim King9de9b1f2015-04-30 16:03:34 -0400159LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100160add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400161endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100162
163add_executable(TFDTransportTest TFDTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200164target_link_libraries(TFDTransportTest
165 ${Boost_LIBRARIES}
166)
Jim King9de9b1f2015-04-30 16:03:34 -0400167LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100168add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
169
170add_executable(TPipedTransportTest TPipedTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200171target_link_libraries(TPipedTransportTest
172 ${Boost_LIBRARIES}
173)
Jim King9de9b1f2015-04-30 16:03:34 -0400174LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100175add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
176
177set(AllProtocolsTest_SOURCES
178 AllProtocolTests.cpp
179 AllProtocolTests.tcc
180 GenericHelpers
181 )
182
183add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
Claudius Heine5ef662b2015-06-24 10:03:50 +0200184target_link_libraries(AllProtocolsTest
185 testgencpp
186 ${Boost_LIBRARIES}
187)
Jim King9de9b1f2015-04-30 16:03:34 -0400188LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100189add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
190
Jim King9de9b1f2015-04-30 16:03:34 -0400191# The debug run-time in Windows asserts on isprint() with negative inputs
192if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
Pascal Bachd5f87e12014-12-12 15:59:17 +0100193add_executable(DebugProtoTest DebugProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200194target_link_libraries(DebugProtoTest
195 testgencpp
196 ${Boost_LIBRARIES}
197)
Jim King9de9b1f2015-04-30 16:03:34 -0400198LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100199add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400200endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100201
202add_executable(JSONProtoTest JSONProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200203target_link_libraries(JSONProtoTest
204 testgencpp
205 ${Boost_LIBRARIES}
206)
Jim King9de9b1f2015-04-30 16:03:34 -0400207LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100208add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
209
210add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200211target_link_libraries(OptionalRequiredTest
212 testgencpp
213 ${Boost_LIBRARIES}
214)
Jim King9de9b1f2015-04-30 16:03:34 -0400215LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100216add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
217
218add_executable(RecursiveTest RecursiveTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200219target_link_libraries(RecursiveTest
220 testgencpp
221 ${Boost_LIBRARIES}
222)
Jim King9de9b1f2015-04-30 16:03:34 -0400223LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100224add_test(NAME RecursiveTest COMMAND RecursiveTest)
225
226add_executable(SpecializationTest SpecializationTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200227target_link_libraries(SpecializationTest
228 testgencpp
229 ${Boost_LIBRARIES}
230)
Jim King9de9b1f2015-04-30 16:03:34 -0400231LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100232add_test(NAME SpecializationTest COMMAND SpecializationTest)
233
234set(concurrency_test_SOURCES
235 concurrency/Tests.cpp
236 concurrency/ThreadFactoryTests.h
237 concurrency/ThreadManagerTests.h
238 concurrency/TimerManagerTests.h
239)
240add_executable(concurrency_test ${concurrency_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400241LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100242add_test(NAME concurrency_test COMMAND concurrency_test)
243
244set(link_test_SOURCES
245 link/LinkTest.cpp
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900246 gen-cpp/ParentService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +0100247 link/TemplatedService1.cpp
248 link/TemplatedService2.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100249)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900250
Pascal Bachd5f87e12014-12-12 15:59:17 +0100251add_executable(link_test ${link_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400252target_link_libraries(link_test testgencpp_cob)
253LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +0900254target_link_libraries(link_test testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100255add_test(NAME link_test COMMAND link_test)
256
257if(WITH_LIBEVENT)
258set(processor_test_SOURCES
259 processor/ProcessorTest.cpp
260 processor/EventLog.cpp
261 processor/ServerThread.cpp
262 processor/EventLog.h
263 processor/Handlers.h
264 processor/ServerThread.h
265)
266add_executable(processor_test ${processor_test_SOURCES})
267target_link_libraries(processor_test
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900268 testgencpp_cob
Pascal Bachd5f87e12014-12-12 15:59:17 +0100269 ${Boost_LIBRARIES}
270)
Jim King9de9b1f2015-04-30 16:03:34 -0400271LINK_AGAINST_THRIFT_LIBRARY(processor_test thrift)
272LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100273add_test(NAME processor_test COMMAND processor_test)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900274
275set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
276add_executable(TNonblockingServerTest ${TNonblockingServerTest_SOURCES})
277include_directories(${LIBEVENT_INCLUDE_DIRS})
278target_link_libraries(TNonblockingServerTest
279 testgencpp_cob
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900280 ${LIBEVENT_LIBRARIES}
281 ${Boost_LIBRARIES}
282)
Jim King9de9b1f2015-04-30 16:03:34 -0400283LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thrift)
284LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900285add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100286endif()
287
288if(OPENSSL_FOUND AND WITH_OPENSSL)
289add_executable(OpenSSLManualInitTest OpenSSLManualInitTest.cpp)
290target_link_libraries(OpenSSLManualInitTest
Pascal Bachd5f87e12014-12-12 15:59:17 +0100291 ${OPENSSL_LIBRARIES}
292 ${Boost_LIBRARIES}
293)
Jim King9de9b1f2015-04-30 16:03:34 -0400294LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100295add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300296
297add_executable(SecurityTest SecurityTest.cpp)
298target_link_libraries(SecurityTest
299 testgencpp
300 ${Boost_LIBRARIES}
301)
302LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100303if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300304target_link_libraries(SecurityTest -lrt)
305endif ()
306add_test(NAME SecurityTest COMMAND SecurityTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
307
Pascal Bachd5f87e12014-12-12 15:59:17 +0100308endif()
309
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900310if(WITH_QT4)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900311set(CMAKE_AUTOMOC ON)
312find_package(Qt4 REQUIRED COMPONENTS QtTest)
313set(TQTcpServerTest_SOURCES
314 qt/TQTcpServerTest.cpp
315)
316add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400317target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
318LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900319add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
320endif()
321
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900322if(WITH_QT5)
323add_subdirectory(qt)
324endif()
325
Pascal Bachd5f87e12014-12-12 15:59:17 +0100326#
327# Common thrift code generation rules
328#
329
330
Ben Craig1684c422015-04-24 08:52:44 -0500331add_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 +0900332 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/DebugProtoTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100333)
334
335add_custom_command(OUTPUT gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900336 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/EnumTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100337)
338
339add_custom_command(OUTPUT gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900340 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/TypedefTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100341)
342
343add_custom_command(OUTPUT gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900344 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/OptionalRequiredTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100345)
346
347add_custom_command(OUTPUT gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900348 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/Recursive.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100349)
350
351add_custom_command(OUTPUT gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900352 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100353)
354
355add_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 +0900356 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100357)
358
359add_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 +0900360 COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style ${CMAKE_CURRENT_SOURCE_DIR}/processor/proc.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100361)