aboutsummaryrefslogtreecommitdiffstats
path: root/ann_benchmark/src/vespa/ann_benchmark/CMakeLists.txt
blob: da27365113ac98b6d2b98133ea750891f325f3bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
install(DIRECTORY DESTINATION libexec/vespa_ann_benchmark)

vespa_add_library(vespa_ann_benchmark
  ALLOW_UNRESOLVED_SYMBOLS
  SOURCES
  vespa_ann_benchmark.cpp

  INSTALL libexec/vespa_ann_benchmark
  DEPENDS
  pybind11::pybind11
)

if (TARGET pybind11::lto)
  target_link_libraries(vespa_ann_benchmark PRIVATE pybind11::module pybind11::lto)
else()
  target_link_libraries(vespa_ann_benchmark PRIVATE pybind11::module)
endif()

if (COMMAND pybind11_extension)
  pybind11_extension(vespa_ann_benchmark)
else()
  set_target_properties(vespa_ann_benchmark PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
  set_target_properties(vespa_ann_benchmark PROPERTIES SUFFIX "${PYTHON_MODULE_EXTENSION}")
endif()

set_target_properties(vespa_ann_benchmark PROPERTIES CXX_VISIBILITY_PRESET "hidden")

configure_file(setup.py.in setup.py @ONLY)

vespa_install_script(setup.py libexec/vespa_ann_benchmark)