Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
build/
bin/
lib/
python_bindings/libs/
python_bindings/pytaco/core/
*__pycache__*
*.swp
*.swo
Expand Down
10 changes: 9 additions & 1 deletion python_bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ foreach(dir ${PY_SRC_DIRS})
file(GLOB PY_SOURCES ${PY_SOURCES} ${dir}/*.cpp)
endforeach()

file(GLOB PYTACO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/pytaco/*.py)
file(GLOB PYTENSOR_FILES ${CMAKE_CURRENT_SOURCE_DIR}/pytaco/pytensor/*.py)

set(PY_SOURCES ${PY_SOURCES})
pybind11_add_module(core_modules ${PY_SOURCES} ${TACO_SOURCES})

set_target_properties(core_modules PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TACO_PROJECT_DIR}/python_bindings/pytaco/core)
set_target_properties(core_modules PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pytaco/core)
target_link_libraries(core_modules LINK_PRIVATE taco)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/pytaco DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})

set(PY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/pytaco)
install(FILES ${PYTACO_FILES} DESTINATION ${PY_INSTALL_PATH})
install(FILES ${PYTENSOR_FILES} DESTINATION ${PY_INSTALL_PATH}/pytensor)
install(TARGETS core_modules DESTINATION ${PY_INSTALL_PATH}/core)