
# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, 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 ported back to the
# original buildsystem will not be accepted.


find_package(Python3 REQUIRED COMPONENTS Development)

add_library(_hnsw SHARED)
target_compile_options(_hnsw PRIVATE
  $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
)
target_cython_sources(_hnsw PRIVATE
  ${CMAKE_SOURCE_DIR}/library/python/hnsw/hnsw/_hnsw.pyx
)
target_link_libraries(_hnsw PUBLIC
  contrib-libs-cxxsupp
  yutil
  Python3::Module
  python-numpy-include
  cpp-hnsw-helpers
  cpp-hnsw-index
  cpp-hnsw-index_builder
  cpp-hnsw-logging
  cpp-online_hnsw-base
  cpp-online_hnsw-dense_vectors
)
target_link_options(_hnsw PRIVATE
  -Wl,-platform_version,macos,11.0,11.0
  -fPIC
  -undefined
  dynamic_lookup
  -flat_namespace
  -fPIC
)
target_sources(_hnsw PRIVATE
  ${CMAKE_SOURCE_DIR}/library/python/hnsw/hnsw/helpers.cpp
)
set_python_type_for_cython(_hnsw
  PY3
)
target_cython_include_directories(_hnsw
  ${CMAKE_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_SOURCE_DIR}/contrib/tools/cython/Cython/Includes
  ${CMAKE_SOURCE_DIR}/contrib/python/numpy/include/numpy/core/include
  ${CMAKE_SOURCE_DIR}/contrib/python/numpy/include/numpy/core/include/numpy
)
target_cython_options(_hnsw
  -E
  UNAME_SYSNAME=Darwin
  --module-name
  _hnsw
  --cplus
)
use_export_script(_hnsw
  ${CMAKE_SOURCE_DIR}/library/python/hnsw/hnsw/hnsw3.exports
)
vcs_info(_hnsw)
