blob: 5d017b413cf86ea3cab4057ac06b4b03f450a287 [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
26#Make sure gen-cpp files can be included
27include_directories("${CMAKE_CURRENT_BINARY_DIR}")
28
29# Create the thrift C++ test library
30set(testgencpp_SOURCES
31 gen-cpp/DebugProtoTest_types.cpp
32 gen-cpp/DebugProtoTest_types.h
33 gen-cpp/EnumTest_types.cpp
34 gen-cpp/EnumTest_types.h
35 gen-cpp/OptionalRequiredTest_types.cpp
36 gen-cpp/OptionalRequiredTest_types.h
37 gen-cpp/Recursive_types.cpp
38 gen-cpp/Recursive_types.h
39 gen-cpp/ThriftTest_types.cpp
40 gen-cpp/ThriftTest_types.h
41 gen-cpp/TypedefTest_types.cpp
42 gen-cpp/TypedefTest_types.h
43 ThriftTest_extras.cpp
44 DebugProtoTest_extras.cpp
45)
46
47add_library(testgencpp STATIC ${testgencpp_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010048
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090049set(testgencpp_cob_SOURCES
Pascal Bachd5f87e12014-12-12 15:59:17 +010050 gen-cpp/ChildService.cpp
51 gen-cpp/ChildService.h
Ben Craig1684c422015-04-24 08:52:44 -050052 gen-cpp/EmptyService.cpp
53 gen-cpp/EmptyService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +010054 gen-cpp/ParentService.cpp
55 gen-cpp/ParentService.h
56 gen-cpp/proc_types.cpp
57 gen-cpp/proc_types.h
58)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +090059add_library(testgencpp_cob STATIC ${testgencpp_cob_SOURCES})
Pascal Bachd5f87e12014-12-12 15:59:17 +010060
61
62add_executable(Benchmark Benchmark.cpp)
63target_link_libraries(Benchmark testgencpp)
Jim King9de9b1f2015-04-30 16:03:34 -040064LINK_AGAINST_THRIFT_LIBRARY(Benchmark thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010065add_test(NAME Benchmark COMMAND Benchmark)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090066target_link_libraries(Benchmark testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +010067
68set(UnitTest_SOURCES
69 UnitTestMain.cpp
70 TMemoryBufferTest.cpp
71 TBufferBaseTest.cpp
72 Base64Test.cpp
73 ToStringTest.cpp
74 TypedefTest.cpp
Roger Meier3815e0b2015-04-04 16:26:30 +020075 TServerSocketTest.cpp
Ben Craig1684c422015-04-24 08:52:44 -050076 TServerTransportTest.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +010077)
78
Roger Meiera6b66332015-05-15 15:21:50 +020079if(NOT WITH_BOOSTTHREADS AND NOT WITH_STDTHREADS AND NOT MSVC)
Pascal Bachd5f87e12014-12-12 15:59:17 +010080 list(APPEND UnitTest_SOURCES RWMutexStarveTest.cpp)
81endif()
82
83add_executable(UnitTests ${UnitTest_SOURCES})
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090084target_link_libraries(UnitTests testgencpp ${Boost_LIBRARIES})
Jim King9de9b1f2015-04-30 16:03:34 -040085LINK_AGAINST_THRIFT_LIBRARY(UnitTests thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +010086add_test(NAME UnitTests COMMAND UnitTests)
ben-craigfae08e72015-07-15 11:34:47 -050087if ( MSVC )
88 # Disable C4503: decorated name length exceeded, name was truncated
89 # 'insanity' results in very long decorated names
90 set_property( TARGET UnitTests APPEND_STRING PROPERTY COMPILE_FLAGS /wd4503 )
91endif ( MSVC )
Pascal Bachd5f87e12014-12-12 15:59:17 +010092
ben-craigaf2d9c82015-07-16 08:11:21 -050093
Martin Haimberger0ad6ee92015-11-13 03:18:50 -080094set( TInterruptTest_SOURCES
95 TSocketInterruptTest.cpp
96 TSSLSocketInterruptTest.cpp
97)
ben-craigaf2d9c82015-07-16 08:11:21 -050098if (WIN32)
99 list(APPEND TInterruptTest_SOURCES
100 TPipeInterruptTest.cpp
101 )
102endif()
103add_executable(TInterruptTest ${TInterruptTest_SOURCES})
104target_link_libraries(TInterruptTest
Ben Craig1684c422015-04-24 08:52:44 -0500105 testgencpp
106 ${Boost_LIBRARIES}
Ben Craig1684c422015-04-24 08:52:44 -0500107)
ben-craigaf2d9c82015-07-16 08:11:21 -0500108LINK_AGAINST_THRIFT_LIBRARY(TInterruptTest thrift)
Thomas Bartelmess9e78ed82015-05-01 13:57:44 -0400109if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
ben-craigaf2d9c82015-07-16 08:11:21 -0500110target_link_libraries(TInterruptTest -lrt)
Ben Craig1684c422015-04-24 08:52:44 -0500111endif ()
Martin Haimberger0ad6ee92015-11-13 03:18:50 -0800112add_test(NAME TInterruptTest COMMAND TInterruptTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
Ben Craig1684c422015-04-24 08:52:44 -0500113
114add_executable(TServerIntegrationTest TServerIntegrationTest.cpp)
115target_link_libraries(TServerIntegrationTest
116 testgencpp_cob
117 ${Boost_LIBRARIES}
118)
Jim King9de9b1f2015-04-30 16:03:34 -0400119LINK_AGAINST_THRIFT_LIBRARY(TServerIntegrationTest thrift)
Thomas Bartelmess9e78ed82015-05-01 13:57:44 -0400120if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Ben Craig1684c422015-04-24 08:52:44 -0500121target_link_libraries(TServerIntegrationTest -lrt)
122endif ()
123add_test(NAME TServerIntegrationTest COMMAND TServerIntegrationTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100124
125if(WITH_ZLIB)
126add_executable(TransportTest TransportTest.cpp)
127target_link_libraries(TransportTest
128 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100129 ${Boost_LIBRARIES}
130 ${ZLIB_LIBRARIES}
131)
Jim King9de9b1f2015-04-30 16:03:34 -0400132LINK_AGAINST_THRIFT_LIBRARY(TransportTest thrift)
133LINK_AGAINST_THRIFT_LIBRARY(TransportTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100134add_test(NAME TransportTest COMMAND TransportTest)
135
136add_executable(ZlibTest ZlibTest.cpp)
137target_link_libraries(ZlibTest
138 testgencpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100139 ${Boost_LIBRARIES}
140 ${ZLIB_LIBRARIES}
141)
Jim King9de9b1f2015-04-30 16:03:34 -0400142LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thrift)
143LINK_AGAINST_THRIFT_LIBRARY(ZlibTest thriftz)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100144add_test(NAME ZlibTest COMMAND ZlibTest)
145endif(WITH_ZLIB)
146
147
148add_executable(EnumTest EnumTest.cpp)
149target_link_libraries(EnumTest
150 testgencpp
151 ${Boost_LIBRARIES}
152)
Jim King9de9b1f2015-04-30 16:03:34 -0400153LINK_AGAINST_THRIFT_LIBRARY(EnumTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100154add_test(NAME EnumTest COMMAND EnumTest)
155
Jim King9de9b1f2015-04-30 16:03:34 -0400156if(HAVE_GETOPT_H)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100157add_executable(TFileTransportTest TFileTransportTest.cpp)
158target_link_libraries(TFileTransportTest
159 testgencpp
160 ${Boost_LIBRARIES}
161)
Jim King9de9b1f2015-04-30 16:03:34 -0400162LINK_AGAINST_THRIFT_LIBRARY(TFileTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100163add_test(NAME TFileTransportTest COMMAND TFileTransportTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400164endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100165
166add_executable(TFDTransportTest TFDTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200167target_link_libraries(TFDTransportTest
168 ${Boost_LIBRARIES}
169)
Jim King9de9b1f2015-04-30 16:03:34 -0400170LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100171add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
172
173add_executable(TPipedTransportTest TPipedTransportTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200174target_link_libraries(TPipedTransportTest
175 ${Boost_LIBRARIES}
176)
Jim King9de9b1f2015-04-30 16:03:34 -0400177LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100178add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
179
180set(AllProtocolsTest_SOURCES
181 AllProtocolTests.cpp
182 AllProtocolTests.tcc
183 GenericHelpers
184 )
185
186add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
Claudius Heine5ef662b2015-06-24 10:03:50 +0200187target_link_libraries(AllProtocolsTest
188 testgencpp
189 ${Boost_LIBRARIES}
190)
Jim King9de9b1f2015-04-30 16:03:34 -0400191LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100192add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
193
Jim King9de9b1f2015-04-30 16:03:34 -0400194# The debug run-time in Windows asserts on isprint() with negative inputs
195if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
Pascal Bachd5f87e12014-12-12 15:59:17 +0100196add_executable(DebugProtoTest DebugProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200197target_link_libraries(DebugProtoTest
198 testgencpp
199 ${Boost_LIBRARIES}
200)
Jim King9de9b1f2015-04-30 16:03:34 -0400201LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100202add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
Jim King9de9b1f2015-04-30 16:03:34 -0400203endif()
Pascal Bachd5f87e12014-12-12 15:59:17 +0100204
205add_executable(JSONProtoTest JSONProtoTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200206target_link_libraries(JSONProtoTest
207 testgencpp
208 ${Boost_LIBRARIES}
209)
Jim King9de9b1f2015-04-30 16:03:34 -0400210LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100211add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
212
213add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200214target_link_libraries(OptionalRequiredTest
215 testgencpp
216 ${Boost_LIBRARIES}
217)
Jim King9de9b1f2015-04-30 16:03:34 -0400218LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100219add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
220
221add_executable(RecursiveTest RecursiveTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200222target_link_libraries(RecursiveTest
223 testgencpp
224 ${Boost_LIBRARIES}
225)
Jim King9de9b1f2015-04-30 16:03:34 -0400226LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100227add_test(NAME RecursiveTest COMMAND RecursiveTest)
228
229add_executable(SpecializationTest SpecializationTest.cpp)
Claudius Heine5ef662b2015-06-24 10:03:50 +0200230target_link_libraries(SpecializationTest
231 testgencpp
232 ${Boost_LIBRARIES}
233)
Jim King9de9b1f2015-04-30 16:03:34 -0400234LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100235add_test(NAME SpecializationTest COMMAND SpecializationTest)
236
237set(concurrency_test_SOURCES
238 concurrency/Tests.cpp
239 concurrency/ThreadFactoryTests.h
240 concurrency/ThreadManagerTests.h
241 concurrency/TimerManagerTests.h
242)
243add_executable(concurrency_test ${concurrency_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400244LINK_AGAINST_THRIFT_LIBRARY(concurrency_test thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100245add_test(NAME concurrency_test COMMAND concurrency_test)
246
247set(link_test_SOURCES
248 link/LinkTest.cpp
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900249 gen-cpp/ParentService.h
Pascal Bachd5f87e12014-12-12 15:59:17 +0100250 link/TemplatedService1.cpp
251 link/TemplatedService2.cpp
Pascal Bachd5f87e12014-12-12 15:59:17 +0100252)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900253
Pascal Bachd5f87e12014-12-12 15:59:17 +0100254add_executable(link_test ${link_test_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400255target_link_libraries(link_test testgencpp_cob)
256LINK_AGAINST_THRIFT_LIBRARY(link_test thrift)
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +0900257target_link_libraries(link_test testgencpp)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100258add_test(NAME link_test COMMAND link_test)
259
260if(WITH_LIBEVENT)
261set(processor_test_SOURCES
262 processor/ProcessorTest.cpp
263 processor/EventLog.cpp
264 processor/ServerThread.cpp
265 processor/EventLog.h
266 processor/Handlers.h
267 processor/ServerThread.h
268)
269add_executable(processor_test ${processor_test_SOURCES})
270target_link_libraries(processor_test
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900271 testgencpp_cob
Pascal Bachd5f87e12014-12-12 15:59:17 +0100272 ${Boost_LIBRARIES}
273)
Jim King9de9b1f2015-04-30 16:03:34 -0400274LINK_AGAINST_THRIFT_LIBRARY(processor_test thrift)
275LINK_AGAINST_THRIFT_LIBRARY(processor_test thriftnb)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100276add_test(NAME processor_test COMMAND processor_test)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900277
278set(TNonblockingServerTest_SOURCES TNonblockingServerTest.cpp)
279add_executable(TNonblockingServerTest ${TNonblockingServerTest_SOURCES})
280include_directories(${LIBEVENT_INCLUDE_DIRS})
281target_link_libraries(TNonblockingServerTest
282 testgencpp_cob
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900283 ${LIBEVENT_LIBRARIES}
284 ${Boost_LIBRARIES}
285)
Jim King9de9b1f2015-04-30 16:03:34 -0400286LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thrift)
287LINK_AGAINST_THRIFT_LIBRARY(TNonblockingServerTest thriftnb)
Nobuaki Sukegawa8016af82015-01-02 23:14:22 +0900288add_test(NAME TNonblockingServerTest COMMAND TNonblockingServerTest)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100289endif()
290
291if(OPENSSL_FOUND AND WITH_OPENSSL)
292add_executable(OpenSSLManualInitTest OpenSSLManualInitTest.cpp)
293target_link_libraries(OpenSSLManualInitTest
Pascal Bachd5f87e12014-12-12 15:59:17 +0100294 ${OPENSSL_LIBRARIES}
295 ${Boost_LIBRARIES}
296)
Jim King9de9b1f2015-04-30 16:03:34 -0400297LINK_AGAINST_THRIFT_LIBRARY(OpenSSLManualInitTest thrift)
Pascal Bachd5f87e12014-12-12 15:59:17 +0100298add_test(NAME OpenSSLManualInitTest COMMAND OpenSSLManualInitTest)
Sergei Nikulov34e0bb62015-09-02 13:06:22 +0300299
300add_executable(SecurityTest SecurityTest.cpp)
301target_link_libraries(SecurityTest
302 testgencpp
303 ${Boost_LIBRARIES}
304)
305LINK_AGAINST_THRIFT_LIBRARY(SecurityTest thrift)
306if (NOT MSVC AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
307target_link_libraries(SecurityTest -lrt)
308endif ()
309add_test(NAME SecurityTest COMMAND SecurityTest "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/keys")
310
Pascal Bachd5f87e12014-12-12 15:59:17 +0100311endif()
312
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900313if(WITH_QT4)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900314set(CMAKE_AUTOMOC ON)
315find_package(Qt4 REQUIRED COMPONENTS QtTest)
316set(TQTcpServerTest_SOURCES
317 qt/TQTcpServerTest.cpp
318)
319add_executable(TQTcpServerTest ${TQTcpServerTest_SOURCES})
Jim King9de9b1f2015-04-30 16:03:34 -0400320target_link_libraries(TQTcpServerTest testgencpp_cob thriftqt Qt4::QtTest)
321LINK_AGAINST_THRIFT_LIBRARY(TQTcpServerTest thrift)
Nobuaki Sukegawa6304a532014-12-18 01:30:58 +0900322add_test(NAME TQTcpServerTest COMMAND TQTcpServerTest)
323endif()
324
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900325if(WITH_QT5)
326add_subdirectory(qt)
327endif()
328
Pascal Bachd5f87e12014-12-12 15:59:17 +0100329#
330# Common thrift code generation rules
331#
332
333
Ben Craig1684c422015-04-24 08:52:44 -0500334add_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 +0900335 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/DebugProtoTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100336)
337
338add_custom_command(OUTPUT gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900339 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/EnumTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100340)
341
342add_custom_command(OUTPUT gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900343 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/TypedefTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100344)
345
346add_custom_command(OUTPUT gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900347 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/OptionalRequiredTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100348)
349
350add_custom_command(OUTPUT gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900351 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/Recursive.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100352)
353
354add_custom_command(OUTPUT gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
Nobuaki Sukegawaca939362015-11-14 00:23:40 +0900355 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/StressTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100356)
357
358add_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 +0900359 COMMAND ${THRIFT_COMPILER} --gen cpp ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100360)
361
362add_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 +0900363 COMMAND ${THRIFT_COMPILER} --gen cpp:templates,cob_style ${CMAKE_CURRENT_SOURCE_DIR}/processor/proc.thrift
Pascal Bachd5f87e12014-12-12 15:59:17 +0100364)