# This file was generated by the YaTool build system (https://github.com/yandex/yatool),
# from a source YaTool build configuration provided in ya.make files.
#
# If the repository supports both CMake and ya build configurations, please modify both of them.
#
# If only CMake build configuration is supported then modify only CMake files and note that only
# simple modifications are allowed like adding source-files to targets or adding simple properties
# like target_include_directories. These modifications will be ported to original ya.make files
# by maintainers. Any complex modifications which can't be easily ported back to the ya build
# system may be rejected.
#
# Please refer to the build instructions in the repository for more information about manual
# changes in this file.

get_built_tool_path(
  TOOL_enum_parser_bin
  TOOL_enum_parser_dependency
  tools/enum_parser/enum_parser
  enum_parser
)

add_subdirectory(idl)

add_library(cpp-text_processing-dictionary)


target_link_libraries(cpp-text_processing-dictionary PUBLIC
  contrib-libs-cxxsupp
  yutil
  cpp-containers-flat_hash
  library-cpp-json
  text_processing-dictionary-idl
  cpp-threading-local_executor
  tools-enum_parser-enum_serialization_runtime
)

target_sources(cpp-text_processing-dictionary PRIVATE
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/bpe_builder.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/bpe_dictionary.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/bpe_helpers.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/dictionary.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/dictionary_builder.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/fbs_helpers.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/frequency_based_dictionary.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/frequency_based_dictionary_impl.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/mmap_frequency_based_dictionary.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/mmap_frequency_based_dictionary_impl.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/mmap_hash_table.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/multigram_dictionary_helpers.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/options.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/serialization_helpers.cpp
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/util.cpp
)


generate_enum_serilization(cpp-text_processing-dictionary
  ${PROJECT_SOURCE_DIR}/library/cpp/text_processing/dictionary/types.h
  INCLUDE_HEADERS
  library/cpp/text_processing/dictionary/types.h
)
