blob: 7fb2aa335c849182b6663c57f0877d7428868e36 [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
Pascal Bachd5f87e12014-12-12 15:59:17 +010020# Find required packages
21set(Boost_USE_STATIC_LIBS ON) # Force the use of static boost test framework
Jim Kingb0b710a2015-07-28 13:31:27 -040022find_package(Boost 1.53.0 REQUIRED COMPONENTS chrono filesystem system thread unit_test_framework)
Nobuaki Sukegawac444fb52015-01-02 23:16:55 +090023include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
Dave Watson792db4e2015-01-16 11:22:01 -080024include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
Pascal Bachd5f87e12014-12-12 15:59:17 +010025
Antonio Di Monaco796667b2016-01-04 23:05:19 +010026if (WITH_DYN_LINK_TEST)
27 add_definitions( -DBOOST_TEST_DYN_LINK )
28endif()
29
Pascal Bachd5f87e12014-12-12 15:59:17 +010030#Make sure gen-cpp files can be included
31include_directories("${CMAKE_CURRENT_BINARY_DIR}")
32
33# Create the thrift C++ test library
34set(testgencpp_SOURCES
35 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
45 gen-cpp/TypedefTest_types.cpp
46 gen-cpp/TypedefTest_types.h
47 ThriftTest_extras.cpp
48 DebugProtoTest_extras.cpp
49)
50
51add_library(testgencpp STATIC ${testgencpp_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010052
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090053set(testgencpp_cob_SOURCES
Pascal Bachd5f87e12014-12-12 15:59:17 +010054 gen-cpp/ChildService.cpp
55 gen-cpp/ChildService.h
Ben Craig1684c422015-04-24 08:52:44 -050056 gen-cpp/EmptyService.cpp
57 gen-cpp/EmptyService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010058 gen-cpp/ParentService.cpp
59 gen-cpp/ParentService.h
60 gen-cpp/proc_types.cpp
61 gen-cpp/proc_types.h
62)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090063add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010064
65
66add_executable(Benchmark Benchmark.cpp)
67target_link_libraries(Benchmark testgencpp)
Jim King9de9b1f2015-04-30 16:03:34 -040068LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010069add_test(NAME Benchmark COMMAND Benchmark)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090070target_link_libraries(Benchmark testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +010071
72set(UnitTest_SOURCES
73 UnitTestMain.cpp
74 TMemoryBufferTest.cpp
75 TBufferBaseTest.cpp
76 Base64Test.cpp
77 ToStringTest.cpp
78 TypedefTest.cpp
Roger Meier3815e0b2015-04-04 16:26:30 +020079 TServerSocketTest.cpp
Ben Craig1684c422015-04-24 08:52:44 -050080 TServerTransportTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010081)
82
Roger Meiera6b66332015-05-15 15:21:50 +020083if(NOT WITH_BOOSTTHREADS AND NOT WITH_STDTHREADS AND NOT MSVC)
Pascal Bachd5f87e12014-12-12 15:59:17 +010084 list(APPEND UnitTest_SOURCES RWMutexStarveTest.cpp)
85endif()
86
87add_executable(UnitTests ${UnitTest_SOURCES})
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090088target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
Jim King9de9b1f2015-04-30 16:03:34 -040089LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010090add_test(NAME UnitTests COMMAND UnitTests)
ben-craigfae08e72015-07-15 11:34:47 -050091if ( MSVC )
92 # Disable C4503: decorated name length exceeded, name was truncated
93 # 'insanity' results in very long decorated names
94 set_property( TARGET UnitTests APPEND_STRING PROPERTY COMPILE_FLAGS /wd4503 )
95endif ( MSVC )
Pascal Bachd5f87e12014-12-12 15:59:17 +010096
ben-craigaf2d9c82015-07-16 08:11:21 -050097
Martin Haimberger0ad6ee92015-11-13 03:18:50 -080098set( TInterruptTest_SOURCES
99 TSocketInterruptTest.cpp
100 TSSLSocketInterruptTest.cpp
101)
ben-craigaf2d9c82015-07-16 08:11:21 -0500102if (WIN32)
103 list(APPEND TInterruptTest_SOURCES
104 TPipeInterruptTest.cpp
105 )
106endif()
107add_executable(TInterruptTest ${TInterruptTest_SOURCES})
108target_link_libraries(TInterruptTest
Ben Craig1684c422015-04-24 08:52:44 -0500109 testgencpp
110 ${Boost_LIBRARIES}
Ben Craig1684c422015-04-24 08:52:44 -0500111)
ben-craigaf2d9c82015-07-16 08:11:21 -0500112LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100113if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
ben-craigaf2d9c82015-07-16 08:11:21 -0500114target_link_libraries(TInterruptTest -lrt)
Ben Craig1684c422015-04-24 08:52:44 -0500115endif ()
Martin Haimberger0ad6ee92015-11-13 03:18:50 -0800116add_test(NAME TInterruptTest COMMAND TInterruptTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Ben Craig1684c422015-04-24 08:52:44 -0500117
118add_executable(TServerIntegrationTest TServerIntegrationTest.cpp)
119target_link_libraries(TServerIntegrationTest
120 testgencpp_cob
121 ${Boost_LIBRARIES}
122)
Jim King9de9b1f2015-04-30 16:03:34 -0400123LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100124if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Ben Craig1684c422015-04-24 08:52:44 -0500125target_link_libraries(TServerIntegrationTest -lrt)
126endif ()
127add_test(NAME TServerIntegrationTest COMMAND TServerIntegrationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100128
129if(WITH_ZLIB)
130add_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
151
152add_executable(EnumTest EnumTest.cpp)
153target_link_libraries(EnumTest
154 testgencpp
155 ${Boost_LIBRARIES}
156)
Jim King9de9b1f2015-04-30 16:03:34 -0400157LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100158add_test(NAME EnumTest COMMAND EnumTest)
159
Jim King9de9b1f2015-04-30 16:03:34 -0400160if(HAVE_GETOPT_H)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100161add_executable(TFileTransportTest TFileTransportTest.cpp)
162target_link_libraries(TFileTransportTest
163 testgencpp
164 ${Boost_LIBRARIES}
165)
Jim King9de9b1f2015-04-30 16:03:34 -0400166LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100167add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400168endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100169
170add_executable(TFDTransportTest TFDTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200171target_link_libraries(TFDTransportTest
172 ${Boost_LIBRARIES}
173)
Jim King9de9b1f2015-04-30 16:03:34 -0400174LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100175add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
176
177add_executable(TPipedTransportTest TPipedTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200178target_link_libraries(TPipedTransportTest
179 ${Boost_LIBRARIES}
180)
Jim King9de9b1f2015-04-30 16:03:34 -0400181LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100182add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
183
184set(AllProtocolsTest_SOURCES
185 AllProtocolTests.cpp
186 AllProtocolTests.tcc
187 GenericHelpers
188 )
189
190add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
Claudius Heine5ef662b2015-06-24 10:03:50 +0200191target_link_libraries(AllProtocolsTest
192 testgencpp
193 ${Boost_LIBRARIES}
194)
Jim King9de9b1f2015-04-30 16:03:34 -0400195LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100196add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
197
Jim King9de9b1f2015-04-30 16:03:34 -0400198# The debug run-time in Windows asserts on isprint() with negative inputs
199if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
Pascal Bachd5f87e12014-12-12 15:59:17 +0100200add_executable(DebugProtoTest DebugProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200201target_link_libraries(DebugProtoTest
202 testgencpp
203 ${Boost_LIBRARIES}
204)
Jim King9de9b1f2015-04-30 16:03:34 -0400205LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100206add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400207endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100208
209add_executable(JSONProtoTest JSONProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200210target_link_libraries(JSONProtoTest
211 testgencpp
212 ${Boost_LIBRARIES}
213)
Jim King9de9b1f2015-04-30 16:03:34 -0400214LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100215add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
216
217add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200218target_link_libraries(OptionalRequiredTest
219 testgencpp
220 ${Boost_LIBRARIES}
221)
Jim King9de9b1f2015-04-30 16:03:34 -0400222LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100223add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
224
225add_executable(RecursiveTest RecursiveTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200226target_link_libraries(RecursiveTest
227 testgencpp
228 ${Boost_LIBRARIES}
229)
Jim King9de9b1f2015-04-30 16:03:34 -0400230LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100231add_test(NAME RecursiveTest COMMAND RecursiveTest)
232
233add_executable(SpecializationTest SpecializationTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200234target_link_libraries(SpecializationTest
235 testgencpp
236 ${Boost_LIBRARIES}
237)
Jim King9de9b1f2015-04-30 16:03:34 -0400238LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100239add_test(NAME SpecializationTest COMMAND SpecializationTest)
240
241set(concurrency_test_SOURCES
242 concurrency/Tests.cpp
243 concurrency/ThreadFactoryTests.h
244 concurrency/ThreadManagerTests.h
245 concurrency/TimerManagerTests.h
246)
247add_executable(concurrency_test ${concurrency_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400248LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100249add_test(NAME concurrency_test COMMAND concurrency_test)
250
251set(link_test_SOURCES
252 link/LinkTest.cpp
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900253 gen-cpp/ParentService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +0100254 link/TemplatedService1.cpp
255 link/TemplatedService2.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100256)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900257
Pascal Bachd5f87e12014-12-12 15:59:17 +0100258add_executable(link_test ${link_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400259target_link_libraries(link_test testgencpp_cob)
260LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +0900261target_link_libraries(link_test testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100262add_test(NAME link_test COMMAND link_test)
263
264if(WITH_LIBEVENT)
265set(processor_test_SOURCES
266 processor/ProcessorTest.cpp
267 processor/EventLog.cpp
268 processor/ServerThread.cpp
269 processor/EventLog.h
270 processor/Handlers.h
271 processor/ServerThread.h
272)
273add_executable(processor_test ${processor_test_SOURCES})
274target_link_libraries(processor_test
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900275 testgencpp_cob
Pascal Bachd5f87e12014-12-12 15:59:17 +0100276 ${Boost_LIBRARIES}
277)
Jim King9de9b1f2015-04-30 16:03:34 -0400278LINK_AGAINST_THRIFT_LIBRARY(processor_test thrift)
279LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100280add_test(NAME processor_test COMMAND processor_test)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900281
282set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
283add_executable(TNonblockingServerTest ${TNonblockingServerTest_SOURCES})
284include_directories(${LIBEVENT_INCLUDE_DIRS})
285target_link_libraries(TNonblockingServerTest
286 testgencpp_cob
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900287 ${LIBEVENT_LIBRARIES}
288 ${Boost_LIBRARIES}
289)
Jim King9de9b1f2015-04-30 16:03:34 -0400290LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thrift)
291LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900292add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100293endif()
294
295if(OPENSSL_FOUND AND WITH_OPENSSL)
296add_executable(OpenSSLManualInitTest OpenSSLManualInitTest.cpp)
297target_link_libraries(OpenSSLManualInitTest
Pascal Bachd5f87e12014-12-12 15:59:17 +0100298 ${OPENSSL_LIBRARIES}
299 ${Boost_LIBRARIES}
300)
Jim King9de9b1f2015-04-30 16:03:34 -0400301LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100302add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300303
304add_executable(SecurityTest SecurityTest.cpp)
305target_link_libraries(SecurityTest
306 testgencpp
307 ${Boost_LIBRARIES}
308)
309LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
Antonio Di Monaco796667b2016-01-04 23:05:19 +0100310if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT MINGW)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300311target_link_libraries(SecurityTest -lrt)
312endif ()
313add_test(NAME SecurityTest COMMAND SecurityTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
314
Pascal Bachd5f87e12014-12-12 15:59:17 +0100315endif()
316
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900317if(WITH_QT4)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900318set(CMAKE_AUTOMOC ON)
319find_package(Qt4 REQUIRED COMPONENTS QtTest)
320set(TQTcpServerTest_SOURCES
321 qt/TQTcpServerTest.cpp
322)
323add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400324target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
325LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900326add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
327endif()
328
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900329if(WITH_QT5)
330add_subdirectory(qt)
331endif()
332
Pascal Bachd5f87e12014-12-12 15:59:17 +0100333#
334# Common thrift code generation rules
335#
336
337
Ben Craig1684c422015-04-24 08:52:44 -0500338add_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 +0900339 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/DebugProtoTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100340)
341
342add_custom_command(OUTPUT gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900343 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/EnumTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100344)
345
346add_custom_command(OUTPUT gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900347 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/TypedefTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100348)
349
350add_custom_command(OUTPUT gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900351 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/OptionalRequiredTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100352)
353
354add_custom_command(OUTPUT gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900355 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/Recursive.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100356)
357
358add_custom_command(OUTPUT gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900359 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100360)
361
362add_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 +0900363 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100364)
365
366add_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 +0900367 COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style ${CMAKE_CURRENT_SOURCE_DIR}/processor/proc.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100368)