File: CMakeLists.txt

package info (click to toggle)
halide 21.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 55,752 kB
  • sloc: cpp: 289,334; ansic: 22,751; python: 7,486; makefile: 4,299; sh: 2,508; java: 1,549; javascript: 282; pascal: 207; xml: 127; asm: 9
file content (17 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)

add_library(Halide_PyStubs STATIC ${CMAKE_CURRENT_LIST_DIR}/PyStubImpl.cpp)
add_library(Halide::PyStubs ALIAS Halide_PyStubs)

# Don't add a direct dependency on pybind11::pybind11 here: that will add a
# phantom dependency which gets propagated into our install setup. All we
# really need here is a path to the include directories for pybind11, which
# BUILD_LOCAL_INTERFACE will accomplish,
target_link_libraries(Halide_PyStubs PRIVATE Halide::Halide $<BUILD_LOCAL_INTERFACE:pybind11::pybind11>)

set_target_properties(Halide_PyStubs PROPERTIES
                      EXPORT_NAME PyStubs
                      OUTPUT_NAME HalidePyStubs${Halide_Python_VERSION_MAJOR}
                      CXX_VISIBILITY_PRESET hidden
                      VISIBILITY_INLINES_HIDDEN TRUE
                      POSITION_INDEPENDENT_CODE ON)