-
Notifications
You must be signed in to change notification settings - Fork 644
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
628 lines (589 loc) · 18.3 KB
/
Copy pathCMakeLists.txt
File metadata and controls
628 lines (589 loc) · 18.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Set the cpp2 directory
set(LIB_CPP2_HOME ${CMAKE_CURRENT_SOURCE_DIR})
if (THRIFT_LIB_ONLY OR build_all)
add_subdirectory(schema)
endif ()
if (enable_tests)
add_subdirectory(protocol/test)
add_subdirectory(test)
endif ()
#######
# CMAKE variables only have local/subdirectory scope
# So even though this is defined in ../thrift/CMakeLists.txt as a variable
# it's not accessible here and silently defaults to ""
#
# Using global properties gets around this; probably better to restructure
# the directories/files to avoid this type of hack
#
get_property(any_rep-cpp2-SOURCES GLOBAL PROPERTY any_rep-cpp2-SOURCES)
get_property(RpcMetadata-cpp2-SOURCES GLOBAL PROPERTY RpcMetadata-cpp2-SOURCES)
get_property(metadata-cpp2-SOURCES GLOBAL PROPERTY metadata-cpp2-SOURCES)
get_property(frozen-cpp2-SOURCES GLOBAL PROPERTY frozen-cpp2-SOURCES)
get_property(RocketUpgrade-cpp2-SOURCES GLOBAL PROPERTY
RocketUpgrade-cpp2-SOURCES)
get_property(id-cpp2-SOURCES GLOBAL PROPERTY id-cpp2-SOURCES)
get_property(standard-cpp2-SOURCES GLOBAL PROPERTY standard-cpp2-SOURCES)
get_property(type_rep-cpp2-SOURCES GLOBAL PROPERTY type_rep-cpp2-SOURCES)
get_property(type-cpp2-SOURCES GLOBAL PROPERTY type-cpp2-SOURCES)
get_property(serverdbginfo-cpp2-SOURCES GLOBAL PROPERTY
serverdbginfo-cpp2-SOURCES)
get_property(protocol-cpp2-SOURCES GLOBAL PROPERTY protocol-cpp2-SOURCES)
get_property(protocol_detail-cpp2-SOURCES GLOBAL PROPERTY
protocol_detail-cpp2-SOURCES)
get_property(record-cpp2-SOURCES GLOBAL PROPERTY record-cpp2-SOURCES)
get_property(schema-cpp2-SOURCES GLOBAL PROPERTY schema-cpp2-SOURCES)
get_property(type_id-cpp2-SOURCES GLOBAL PROPERTY type_id-cpp2-SOURCES)
get_property(type_system-cpp2-SOURCES GLOBAL PROPERTY type_system-cpp2-SOURCES)
get_property(service_catalog-cpp2-SOURCES GLOBAL PROPERTY
service_catalog-cpp2-SOURCES)
get_property(thrift_catalog_service-cpp2-SOURCES GLOBAL PROPERTY
thrift_catalog_service-cpp2-SOURCES)
get_property(syntax_graph-cpp2-SOURCES GLOBAL PROPERTY
syntax_graph-cpp2-SOURCES)
bypass_source_check("${type_id-cpp2-SOURCES}")
bypass_source_check("${protocol-cpp2-SOURCES}")
bypass_source_check("${protocol_detail-cpp2-SOURCES}")
bypass_source_check("${type_system-cpp2-SOURCES}")
bypass_source_check("${schema-cpp2-SOURCES}")
bypass_source_check("${record-cpp2-SOURCES}")
bypass_source_check("${syntax_graph-cpp2-SOURCES}")
bypass_source_check("${service_catalog-cpp2-SOURCES}")
bypass_source_check("${metadata-cpp2-SOURCES}")
add_library(
thriftmetadata
${metadata-cpp2-SOURCES}
gen/module_types_cpp.cpp
detail/Enum.cpp
dynamic/SerializableRecord.cpp
dynamic/SerializableTypeSystemBuilder.cpp
dynamic/TypeId.cpp
dynamic/TypeSystem.cpp
dynamic/TypeSystemBuilder.cpp
dynamic/TypeSystemDigest.cpp
dynamic/TypeSystemTraits.cpp
runtime/BaseSchemaRegistry.cpp
runtime/Init.cpp
schema/detail/Merge.cpp
../thrift/detail/protocol.cpp
../thrift/detail/TypeIdAdapter.cpp
../thrift/detail/TypeSystemAdapter.cpp
${protocol-cpp2-SOURCES}
${protocol_detail-cpp2-SOURCES}
${type_id-cpp2-SOURCES}
${type_system-cpp2-SOURCES}
${schema-cpp2-SOURCES}
${record-cpp2-SOURCES}
${syntax_graph-cpp2-SOURCES}
${service_catalog-cpp2-SOURCES}
)
add_dependencies(thriftmetadata metadata-cpp2-target
any_rep-cpp2-target
protocol-cpp2-target
protocol_detail-cpp2-target
type-cpp2-target
type_id-cpp2-target
type_system-cpp2-target
schema-cpp2-target
record-cpp2-target
syntax_graph-cpp2-target
service_catalog-cpp2-target)
target_link_libraries(
thriftmetadata
PUBLIC
Folly::folly
thriftprotocol
)
if(Xxhash_FOUND)
target_link_libraries(thriftmetadata PUBLIC ${Xxhash_LIBRARY})
target_include_directories(thriftmetadata PUBLIC ${Xxhash_INCLUDE_DIR})
endif()
# SerializableRecord.cpp includes F14Map and instantiates PrimitiveDatum for
# every primitive type; on MSVC this exceeds the default COFF section limit.
if (MSVC)
target_compile_options(thriftmetadata PRIVATE /bigobj)
endif ()
add_library(
thrift_path
dynamic/Path.cpp
)
add_dependencies(thrift_path thriftmetadata thriftprotocol)
target_link_libraries(
thrift_path
PUBLIC
fmt::fmt
Folly::folly
thriftmetadata
thriftprotocol
)
add_library(
thrift_dynamic_value
dynamic/Any.cpp
dynamic/Binary.cpp
dynamic/DynamicValue.cpp
dynamic/List.cpp
dynamic/Map.cpp
dynamic/Set.cpp
dynamic/String.cpp
dynamic/Struct.cpp
dynamic/Union.cpp
dynamic/ServiceCatalogDigest.cpp
dynamic/ServiceDescriptorSerialization.cpp
dynamic/detail/ConcreteMapAny.cpp
dynamic/detail/ConcreteMapBinary.cpp
dynamic/detail/ConcreteMapBool.cpp
dynamic/detail/ConcreteMapDouble.cpp
dynamic/detail/ConcreteMapFloat.cpp
dynamic/detail/ConcreteMapI16.cpp
dynamic/detail/ConcreteMapI32.cpp
dynamic/detail/ConcreteMapI64.cpp
dynamic/detail/ConcreteMapI8.cpp
dynamic/detail/ConcreteMapList.cpp
dynamic/detail/ConcreteMapMap.cpp
dynamic/detail/ConcreteMapSet.cpp
dynamic/detail/ConcreteMapString.cpp
dynamic/detail/ConcreteMapStruct.cpp
dynamic/detail/ConcreteMapUnion.cpp
dynamic/detail/ConcreteSet.cpp
dynamic/detail/Datum.cpp
dynamic/detail/DatumHash.cpp
# ServiceDescriptor and the SyntaxGraph-backed catalog that builds it use
# DynamicValue for annotations, so they layer above thriftmetadata here.
# Putting them in thriftmetadata would cycle with thrift_dynamic_value.
dynamic/AnnotationValue.cpp
dynamic/ServiceDescriptor.cpp
schema/detail/SchemaBackedResolver.cpp
schema/SyntaxGraph.cpp
runtime/SchemaRegistry.cpp
)
add_dependencies(thrift_dynamic_value thriftmetadata thriftprotocol thrift_path)
target_link_libraries(
thrift_dynamic_value
PUBLIC
Folly::folly
thriftmetadata
thriftprotocol
thrift_path
)
# dynamic/Map.cpp and ConcreteMap*.cpp instantiate F14Map for every value type;
# on MSVC this exceeds the default COFF section limit.
if (MSVC)
target_compile_options(thrift_dynamic_value PRIVATE /bigobj)
endif ()
bypass_source_check("${frozen-cpp2-SOURCES}")
add_library(
thriftfrozen2
frozen/Frozen.cpp
frozen/FrozenUtil.cpp
frozen/schema/MemorySchema.cpp
${frozen-cpp2-SOURCES}
)
add_dependencies(thriftfrozen2 frozen-cpp2-target thriftmetadata)
target_link_libraries(
thriftfrozen2
PUBLIC
Folly::folly
thriftmetadata
thriftprotocol
${GLOG_LIBRARIES}
${LIBGFLAGS_LIBRARY}
)
bypass_source_check("${id-cpp2-SOURCES}")
bypass_source_check("${standard-cpp2-SOURCES}")
bypass_source_check("${type_rep-cpp2-SOURCES}")
add_library(
thrifttyperep
${id-cpp2-SOURCES}
${standard-cpp2-SOURCES}
${type_rep-cpp2-SOURCES}
)
add_dependencies(thrifttyperep id-cpp2-target standard-cpp2-target
type_rep-cpp2-target thriftannotation)
target_link_libraries(
thrifttyperep
PUBLIC
Folly::folly
thriftannotation
)
bypass_source_check("${type-cpp2-SOURCES}")
bypass_source_check("${any_rep-cpp2-SOURCES}")
add_library(
thrifttype
${any_rep-cpp2-SOURCES}
${type-cpp2-SOURCES}
op/Serializer.cpp
type/Any.cpp
type/BaseType.cpp
type/Protocol.cpp
type/Runtime.cpp
type/Type.cpp
type/TypeRegistry.cpp
type/UniversalName.cpp
)
add_dependencies(thrifttype any_rep-cpp2-target type-cpp2-target
thriftannotation thrifttyperep thriftprotocol)
target_link_libraries(
thrifttype
PUBLIC
common
Folly::folly
thriftannotation
thrifttyperep
thriftprotocol
)
# thriftanyrep sources are now compiled into thrifttype to avoid a circular
# shared library dependency. Keep thriftanyrep as a thin wrapper so that
# existing consumers (e.g. Haskell FFI) that link -lthriftanyrep keep working.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/thriftanyrep_stub.cpp" "")
add_library(thriftanyrep "${CMAKE_CURRENT_BINARY_DIR}/thriftanyrep_stub.cpp")
target_link_libraries(thriftanyrep PUBLIC thrifttype)
bypass_source_check("${RpcMetadata-cpp2-SOURCES}")
add_library(
rpcmetadata
${RpcMetadata-cpp2-SOURCES}
gen/module_types_cpp.cpp
detail/Enum.cpp
)
add_dependencies(rpcmetadata RpcMetadata-cpp2-target)
target_link_libraries(
rpcmetadata
PUBLIC
Folly::folly
thriftprotocol
)
bypass_source_check("${serverdbginfo-cpp2-SOURCES}")
add_library(
serverdbginfo
${serverdbginfo-cpp2-SOURCES}
)
add_dependencies(serverdbginfo serverdbginfo-cpp2-target)
target_link_libraries(
serverdbginfo
PUBLIC
Folly::folly
)
add_library(
thriftprotocol
protocol/Protocol.cpp
protocol/BinaryProtocol.cpp
protocol/CompactProtocol.cpp
protocol/CompactV1Protocol.cpp
protocol/DebugProtocol.cpp
protocol/JSONProtocol.cpp
protocol/JSONProtocolCommon.cpp
protocol/Serializer.cpp
protocol/TableBasedSerializer.cpp
protocol/TableBasedSerializerImpl.cpp
protocol/VirtualProtocol.cpp
../cpp/protocol/TBase64Utils.cpp
../cpp/protocol/TProtocolException.cpp
../cpp/protocol/TType.cpp
../cpp/util/VarintUtils.cpp
)
target_link_libraries(
thriftprotocol
PUBLIC
fmt::fmt
Folly::folly
${GLOG_LIBRARIES}
thrift-core
)
if (THRIFT_RPC)
bypass_source_check("${RocketUpgrade-cpp2-SOURCES}")
bypass_source_check("${thrift_catalog_service-cpp2-SOURCES}")
add_library(
thriftcpp2
FieldRef.cpp
Flags.cpp
GeneratedCodeHelper.cpp
TrustedServerException.cpp
async/AsyncClient.cpp
async/AsyncProcessor.cpp
async/AsyncProcessorFactory.cpp
async/AsyncProcessorHelper.cpp
async/ClientChannel.cpp
async/ClientSinkBridge.cpp
async/ClientStreamBridge.cpp
async/ClientStreamInterceptorContext.cpp
async/Cpp2Channel.cpp
async/DuplexChannel.cpp
async/FramingHandler.cpp
async/HeaderChannel.cpp
async/HeaderChannelTrait.cpp
async/HeaderClientChannel.cpp
async/HeaderServerChannel.cpp
async/HibernatingRequestChannel.cpp
async/Interaction.cpp
async/InteractionOverloadPolicy.cpp
async/InterceptorFlags.cpp
async/MultiplexAsyncProcessor.cpp
async/PooledRequestChannel.cpp
async/ReconnectingRequestChannel.cpp
async/RequestCallback.cpp
async/RequestChannel.cpp
async/ResponseChannel.cpp
async/RetryingRequestChannel.cpp
async/RocketClientChannel.cpp
async/RocketClientChannelBase.cpp
async/RpcOptions.cpp
async/RpcTypes.cpp
async/SecureRocketClientChannel.cpp
async/ServerBiDiStreamFactory.cpp
async/ServerGeneratorStreamBridge.cpp
async/ServerRequestData.cpp
async/ServerSinkBridge.cpp
async/ServerSinkFactory.cpp
async/ServerStreamDetail.cpp
async/StreamPayload.cpp
async/processor/AsyncProcessor.cpp
async/processor/AsyncProcessorFunc.cpp
async/processor/EventTask.cpp
async/processor/GeneratedAsyncProcessorBase.cpp
async/processor/HandlerCallback.cpp
async/processor/HandlerCallbackBase.cpp
async/processor/HandlerCallbackOneWay.cpp
async/processor/RequestParams.cpp
async/processor/RequestTask.cpp
async/processor/ServerInterface.cpp
async/processor/ServerRequest.cpp
async/processor/ServerRequestHelper.cpp
async/processor/ServerRequestTask.cpp
async/processor/ServiceHandlerBase.cpp
gen/module_constants_cpp.cpp
gen/module_types_cpp.cpp
detail/Enum.cpp
fast_thrift/channel_pipeline/PipelineImpl.cpp
fast_thrift/channel_pipeline/detail/ContextImpl.cpp
fast_thrift/frame/write/FrameWriter.cpp
fast_thrift/thrift/FastThriftAdapterBase.cpp
fast_thrift/thrift/client/ThriftClientChannel.cpp
fast_thrift/thrift/client/util/RocketFrameDecoder.cpp
fast_thrift/thrift/server/ThriftServerChannel.cpp
fast_thrift/transport/TransportHandler.cpp
logging/ThriftBiDiLog.cpp
logging/ThriftConnectionLog.cpp
logging/ThriftSinkLog.cpp
logging/ThriftStreamLog.cpp
security/AsyncStopTLS.cpp
security/FizzPeeker.cpp
security/SSLUtil.cpp
security/extensions/ThriftParametersClientExtension.cpp
security/extensions/ThriftParametersServerExtension.cpp
security/extensions/Types.cpp
server/AdaptiveConcurrency.cpp
server/ConcurrencyControllerBase.cpp
server/Cpp2ConnContext.cpp
server/Cpp2Connection.cpp
server/Cpp2Worker.cpp
server/CPUConcurrencyController.cpp
server/DecoratorData.cpp
server/DecoratorDataRuntime.cpp
server/LazyDynamicArguments.cpp
server/LegacyHeaderRoutingHandler.cpp
server/LoggingEvent.cpp
server/LoggingEventHelper.cpp
server/LoggingEventTransportMetadata.cpp
server/MonitoringMethodNames.cpp
server/ParallelConcurrencyController.cpp
server/TokenBucketConcurrencyController.cpp
server/ServiceInterceptorQualifiedName.cpp
server/StandardConcurrencyController.cpp
server/ThreadManagerLoggingWrapper.cpp
server/RequestDebugLog.cpp
server/RequestEncryptionState.cpp
server/RequestPileBase.cpp
server/ReactiveToggle.cpp
server/RequestsRegistry.cpp
server/ResourcePool.cpp
server/ResourcePoolSet.cpp
server/ResourcePoolHandle.cpp
server/RoundRobinRequestPile.cpp
server/WeightedRequestPileQueue.cpp
server/ServerAttribute.cpp
server/ServerFlags.cpp
server/ServerInstrumentation.cpp
server/ServiceHealthPoller.cpp
server/ServiceInterceptorBase.cpp
server/ServiceInterceptorControl.cpp
server/ServiceInterceptorOnDrop.cpp
server/ServiceInterceptorOnReceived.cpp
server/ServiceInterceptorQualifiedName.cpp
server/ThriftCatalogServerInterface.cpp
server/ThriftProcessor.cpp
server/ThriftServer.cpp
server/ThriftServerConfig.cpp
server/TMConcurrencyController.cpp
server/peeking/TLSHelper.cpp
server/metrics/PendingConnectionsMetrics.cpp
transport/core/RequestStateMachine.cpp
transport/core/RpcMetadataUtil.cpp
transport/core/RpcMetadataPlugins.cpp
transport/core/SendCallbacks.cpp
transport/core/ThriftClient.cpp
transport/core/ThriftClientCallback.cpp
transport/core/ThriftRequest.cpp
transport/rocket/FdSocket.cpp
transport/rocket/ChecksumGenerator.cpp
transport/rocket/Types.cpp
transport/rocket/compression/CustomCompressorRegistry.cpp
transport/rocket/client/RequestContext.cpp
transport/rocket/client/RequestContextQueue.cpp
transport/rocket/client/RocketClient.cpp
transport/rocket/client/SecureRocketClient.cpp
transport/rocket/client/KeepAliveWatcher.cpp
transport/rocket/client/RocketStreamServerCallback.cpp
transport/rocket/client/RocketStreamServerCallbackWithChunkTimeout.cpp
transport/rocket/client/RocketSinkServerCallback.cpp
transport/rocket/client/RocketBiDiServerCallback.cpp
transport/rocket/flush/FlushManager.cpp
transport/rocket/framing/parser/AllocatingParserStrategy.cpp
transport/rocket/framing/ErrorCode.cpp
transport/rocket/framing/FrameDataFirstFieldAligner.cpp
transport/rocket/framing/Frames.cpp
transport/rocket/framing/Parser.cpp
transport/rocket/framing/Serializer.cpp
transport/rocket/framing/Util.cpp
transport/rocket/payload/DefaultPayloadSerializerStrategy.cpp
transport/rocket/payload/PayloadSerializer.cpp
transport/rocket/server/BidirectionalStreamState.cpp
transport/rocket/server/InteractionOverload.cpp
transport/rocket/server/RocketRoutingHandler.cpp
transport/rocket/server/RocketServerConnection.cpp
transport/rocket/server/RefactoredRocketServerConnection.cpp
transport/rocket/server/RefactoredThriftRocketServerHandler.cpp
transport/rocket/server/RocketServerConnectionPlugins.cpp
transport/rocket/server/RocketServerFrameContext.cpp
transport/rocket/server/RocketSinkClientCallback.cpp
transport/rocket/server/RocketServerUtil.cpp
transport/rocket/server/RocketStreamClientCallback.cpp
transport/rocket/server/RocketBiDiClientCallback.cpp
transport/rocket/server/RocketThriftRequests.cpp
transport/rocket/server/RocketServerConnectionFactory.cpp
transport/rocket/server/ThriftRocketServerHandler.cpp
transport/rocket/server/detail/RequestEncryptionStateDispatch.cpp
transport/rocket/server/detail/RocketContextUtils.cpp
transport/rocket/server/detail/RocketErrorHandler.cpp
transport/rocket/server/detail/RocketRequestHandler.cpp
transport/rocket/server/detail/RocketRequestOrchestrator.cpp
transport/rocket/server/detail/RocketRequestProcessor.cpp
transport/rocket/server/detail/RocketSetupProcessor.cpp
transport/rocket/server/detail/WriteBatcher.cpp
util/Checksum.cpp
util/DebugString.cpp
util/EmptyAsyncProcessor.cpp
util/SchemaToMetadata.cpp
util/ScopedServerInterfaceThread.cpp
util/ScopedServerThread.cpp
${RocketUpgrade-cpp2-SOURCES}
${thrift_catalog_service-cpp2-SOURCES}
)
add_dependencies(
thriftcpp2
rpcmetadata
RocketUpgrade-cpp2-target
thrift_catalog_service-cpp2-target
thriftannotation
thriftmetadata
thrift_path
thrift_dynamic_value
thrifttyperep
thrifttype
thriftanyrep
serverdbginfo
)
target_link_libraries(
thriftcpp2
PUBLIC
fmt::fmt
thrift
rpcmetadata
thriftannotation
thriftmetadata
thrift_path
thrift_dynamic_value
thriftfrozen2
thriftprotocol
thrifttyperep
thrifttype
thriftanyrep
serverdbginfo
${Xxhash_LIBRARY}
)
add_library(
quic_thriftcpp2
server/ThriftQuicServer.cpp
)
add_dependencies(
quic_thriftcpp2
thriftcpp2
mvfst::mvfst_server_async_tran
)
target_link_libraries(
quic_thriftcpp2
PUBLIC
thriftcpp2
mvfst::mvfst_server_async_tran
)
endif () # THRIFT_RPC
# Install includes
set(THRIFT2_HEADER_DIRS
async
fast_thrift
frozen
protocol
server
transport
util
)
install(
DIRECTORY ${THRIFT2_HEADER_DIRS}
DESTINATION ${INCLUDE_INSTALL_DIR}/thrift/lib/cpp2
FILES_MATCHING PATTERN "*.h" PATTERN "*.tcc"
)
if (BUILD_SHARED_LIBS)
set_target_properties(rpcmetadata thriftannotation thriftmetadata thrift_path
thrift_dynamic_value thriftfrozen2 thriftprotocol thrifttyperep thrifttype
thriftanyrep serverdbginfo
PROPERTIES VERSION ${PACKAGE_VERSION}
)
if (THRIFT_RPC)
set_target_properties(thriftcpp2
PROPERTIES VERSION ${PACKAGE_VERSION}
)
endif ()
endif()
install(
TARGETS
rpcmetadata
thriftmetadata
thrift_path
thrift_dynamic_value
thriftfrozen2
thrifttyperep
thrifttype
thriftanyrep
thriftprotocol
serverdbginfo
EXPORT fbthrift-exports
DESTINATION ${LIB_INSTALL_DIR}
)
if (THRIFT_RPC)
install(
TARGETS
thriftcpp2
EXPORT fbthrift-exports
DESTINATION ${LIB_INSTALL_DIR}
)
endif ()