# 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(ut)
add_subdirectory(bin)

add_library(catboost-cuda-targets)


target_link_libraries(catboost-cuda-targets PUBLIC
  contrib-libs-cxxsupp
  yutil
  catboost-cuda-cuda_lib
  catboost-cuda-cuda_util
  catboost-cuda-gpu_data
  catboost-libs-data
  catboost-libs-helpers
  catboost-libs-logging
  catboost-libs-metrics
  private-libs-options
  cpp-threading-local_executor
  internal-platform-cuda
)

target_sources(catboost-cuda-targets PRIVATE
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/auc.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/combination_targets_impl.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/gpu_metrics.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/multiclass_targets.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/pair_logit_pairwise.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/pfound_f.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/pointwise_target_impl.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/query_cross_entropy.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/querywise_targets_impl.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/target_func.cpp
)

target_cuda_sources(catboost-cuda-targets PRIVATE
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/dcg.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/multilogit.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/pair_logit.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/pfound_f.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/pointwise_targets.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/query_cross_entropy.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/query_rmse.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/query_softmax.cu
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel/yeti_rank_pointwise.cu
)


target_cuda_flags(catboost-cuda-targets
  -Wno-deprecated-gpu-targets
)

add_global_library_for(catboost-cuda-targets.global
  catboost-cuda-targets)


target_link_libraries(catboost-cuda-targets.global PUBLIC
  contrib-libs-cxxsupp
  yutil
  catboost-cuda-cuda_lib
  catboost-cuda-cuda_util
  catboost-cuda-gpu_data
  catboost-libs-data
  catboost-libs-helpers
  catboost-libs-logging
  catboost-libs-metrics
  private-libs-options
  cpp-threading-local_executor
  internal-platform-cuda
)

target_sources(catboost-cuda-targets.global PRIVATE
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/dcg.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/kernel.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/multiclass_kernels.cpp
  ${PROJECT_SOURCE_DIR}/catboost/cuda/targets/query_cross_entropy_kernels.cpp
)

