<commit_before># 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.


add_library(
  thrift-core

  Thrift.cpp
  ../cpp2/FieldRef.cpp
)
target_include_directories(
  thrift-core
  INTERFACE
    $<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
)
target_link_libraries(
  thrift-core
  PUBLIC
    fmt::fmt
    Folly::folly
)

add_library(
  concurrency

  concurrency/InitThreadFactory.cpp
  concurrency/PosixThreadFactory.cpp
  concurrency/ThreadManager.cpp
  concurrency/TimerManager.cpp
  concurrency/Util.cpp
)
target_link_libraries(
  concurrency
  PUBLIC
    Folly::folly
    ${LIBGFLAGS_LIBRARY}
    ${GLOG_LIBRARIES}
)

add_library(
  transport

  transport/TTransportException.cpp
  transport/TFDTransport.cpp
  transport/THttpTransport.cpp
  transport/THttpClient.cpp
  transport/THttpServer.cpp
  transport/TSocket.cpp
  transport/TBufferTransports.cpp
  transport/THeader.cpp
  transport/TZlibTransport.cpp
  ../cpp2/transport/rocket/framing/Util.cpp
  util/PausableTimer.cpp
  util/THttpParser.cpp
  util/VarintUtils.cpp
)
add_dependencies(
  transport
  rpcmetadata
)
target_link_libraries(
  transport
  PUBLIC
    concurrency
    thrift-core
    rpcmetadata
    Folly::folly
    ZLIB::ZLIB
    ${OPENSSL_LIBRARIES}
    ${ZSTD_LIBRARIES}
)

add_library(
  async

  ContextStack.cpp
  EventHandlerBase.cpp
  async/TBinaryAsyncChannel.cpp
  async/TFramedAsyncChannel.cpp
  async/THttpAsyncChannel.cpp
  async/TUnframedAsyncChannel.cpp
  server/TServerObserver.cpp
)
target_link_libraries(<commit_msg>Add -fsized-deallocation compile option (#528)<commit_after># 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.


add_library(
  thrift-core

  Thrift.cpp
  ../cpp2/FieldRef.cpp
)
target_include_directories(
  thrift-core
  INTERFACE
    $<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
)
target_link_libraries(
  thrift-core
  PUBLIC
    fmt::fmt
    Folly::folly
)

add_library(
  concurrency

  concurrency/InitThreadFactory.cpp
  concurrency/PosixThreadFactory.cpp
  concurrency/ThreadManager.cpp
  concurrency/TimerManager.cpp
  concurrency/Util.cpp
)
target_link_libraries(
  concurrency
  PUBLIC
    Folly::folly
    ${LIBGFLAGS_LIBRARY}
    ${GLOG_LIBRARIES}
)

add_library(
  transport

  transport/TTransportException.cpp
  transport/TFDTransport.cpp
  transport/THttpTransport.cpp
  transport/THttpClient.cpp
  transport/THttpServer.cpp
  transport/TSocket.cpp
  transport/TBufferTransports.cpp
  transport/THeader.cpp
  transport/TZlibTransport.cpp
  ../cpp2/transport/rocket/framing/Util.cpp
  util/PausableTimer.cpp
  util/THttpParser.cpp
  util/VarintUtils.cpp
)
add_dependencies(
  transport
  rpcmetadata
)
target_link_libraries(
  transport
  PUBLIC
    concurrency
    thrift-core
    rpcmetadata
    Folly::folly
    ZLIB::ZLIB
    ${OPENSSL_LIBRARIES}
    ${ZSTD_LIBRARIES}
)

add_library(
  async

  ContextStack.cpp
  EventHandlerBase.cpp
  async/TBinaryAsyncChannel.cpp
  async/TFramedAsyncChannel.cpp
  async/THttpAsyncChannel.cpp
  async/TUnframedAsyncChannel.cpp
  server/TServerObserver.cpp
)
if (
  CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
  CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
)
  target_compile_options(
    async
    PUBLIC
      $<$<COMPILE_LANGUAGE:CXX>:-fsized-deallocation>
  )
endif()
target_link_libraries(
{'fraction_non_alphanumeric': 0.07812860106015211, 'fraction_numerical': 0.0034570177460244295, 'mean_word_length': 4.185185185185185, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3371538', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1418, 'n_words': 316}