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

add_subdirectory(lib)

add_executable(model_ut)


target_link_libraries(model_ut PUBLIC
  contrib-libs-cxxsupp
  yutil
  build-cow-on
  library-cpp-cpuid_check
  cpp-testing-unittest_main
  private-libs-algo
  catboost-libs-data
  catboost-libs-model
  model-ut-lib
  catboost-libs-train_lib
  text_features-ut-lib
  library-cpp-json
)

target_allocator(model_ut
  system_allocator
)

target_link_options(model_ut PRIVATE
  -Wl,-platform_version,macos,11.0,11.0
  -fPIC
  -fPIC
  -framework
  CoreFoundation
)

target_sources(model_ut PRIVATE
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/model_export_helpers_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/formula_evaluator_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/json_model_export_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/leaf_weights_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/model_metadata_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/model_serialization_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/model_summ_ut.cpp
  ${PROJECT_SOURCE_DIR}/catboost/libs/model/ut/shrink_model_ut.cpp
)


set_property(
  TARGET
  model_ut
  PROPERTY
  SPLIT_FACTOR
  1
)

add_yunittest(
  NAME
  model_ut
  TEST_TARGET
  model_ut
  TEST_ARG
  --print-before-suite
  --print-before-test
  --fork-tests
  --print-times
  --show-fails
)

set_yunittest_property(
  TEST
  model_ut
  PROPERTY
  LABELS
  MEDIUM
)

set_yunittest_property(
  TEST
  model_ut
  PROPERTY
  ENVIRONMENT
)

vcs_info(model_ut)

set_yunittest_property(
  TEST
  model_ut
  PROPERTY
  PROCESSORS
  1
)
