onnx-mlir/src/CMakeLists.txt

34 lines
923 B
CMake
Raw Normal View History

add_subdirectory(Interface)
add_subdirectory(Dialect)
add_subdirectory(Conversion)
add_subdirectory(Transform)
add_subdirectory(Tool)
add_subdirectory(Builder)
add_subdirectory(Runtime)
2019-12-23 13:13:52 +08:00
add_executable(onnx-mlir main.cpp)
target_link_libraries(onnx-mlir
${MLIRLibs}
OMBuilder
OMKrnlOps
OMONNXOps
OMKrnlToAffine
OMKrnlToLLVM
OMShapeInference
OMONNXToKrnl
OMONNXRewrite
OMAttributePromotion
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS})
whole_archive_link_mlir(onnx-mlir
${MLIRWholeArchiveLibs})
2020-01-22 00:08:16 +08:00
find_package(ZLIB REQUIRED)
target_link_libraries(onnx-mlir ${ZLIB_LIBRARIES})
target_include_directories(onnx-mlir PRIVATE ${ONNX_MLIR_SRC_ROOT})
target_include_directories(onnx-mlir PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(onnx-mlir PRIVATE ${ONNX_MLIR_BIN_ROOT})
install(TARGETS onnx-mlir DESTINATION bin)