onnx-mlir/src/CMakeLists.txt

33 lines
853 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 ${CMAKE_SOURCE_DIR})
target_include_directories(onnx-mlir PRIVATE ${CMAKE_BINARY_DIR})
install(TARGETS onnx-mlir DESTINATION bin)