onnx-mlir/src/Runtime/CMakeLists.txt

23 lines
782 B
CMake
Raw Normal View History

# Create shared libcruntime.so since model.so linkage for backend tests
# will fail on x86 Linux if cruntime is statically linked.
add_library(cruntime SHARED
DynMemRef.cpp
DynMemRef.h
DataType.h)
target_include_directories(cruntime
PRIVATE ${ONNX_MLIR_SRC_ROOT} ${ONNX_MLIR_BIN_ROOT}
${ONNX_MLIR_SRC_ROOT})
pybind11_add_module(pyruntime
DynMemRef.cpp
DynMemRef.h
Runtime.cpp
Runtime.hpp)
target_link_libraries(pyruntime PRIVATE ${CMAKE_DL_LIBS})
target_include_directories(pyruntime
PRIVATE ${ONNX_MLIR_SRC_ROOT} ${ONNX_MLIR_BIN_ROOT}
${ONNX_MLIR_SRC_ROOT})
2019-12-23 12:52:49 +08:00
add_dependencies(pyruntime cruntime)
install(FILES Runtime/DynMemRef.h DESTINATION include)
install(TARGETS cruntime DESTINATION lib)