Make path relative to onnx-mlir project only (#40)

* Make path relative to onnx-mlir project.

* Use binary root folder path for onnx-mlir.
This commit is contained in:
Gheorghe-Teodor Bercea 2020-03-20 12:04:22 -04:00 committed by GitHub
parent febee542ee
commit b3719d486b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 10 deletions

View File

@ -35,7 +35,7 @@ set(MLIR_BIN_INCLUDE_PATH ${LLVM_PROJ_BUILD}/tools/mlir/include)
set(MLIR_TOOLS_DIR ${LLVM_PROJ_BUILD}/bin) set(MLIR_TOOLS_DIR ${LLVM_PROJ_BUILD}/bin)
set(ONNX_MLIR_TOOLS_DIR ${ONNX_MLIR_BIN_ROOT}/bin) set(ONNX_MLIR_TOOLS_DIR ${ONNX_MLIR_BIN_ROOT}/bin)
set(ONNX_MLIR_LIT_TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/test/mlir) set(ONNX_MLIR_LIT_TEST_SRC_DIR ${ONNX_MLIR_SRC_ROOT}/test/mlir)
set(ONNX_MLIR_LIT_TEST_BUILD_DIR ${CMAKE_BINARY_DIR}/test/mlir) set(ONNX_MLIR_LIT_TEST_BUILD_DIR ${CMAKE_BINARY_DIR}/test/mlir)
set( set(

View File

@ -3,6 +3,6 @@ find_package(PythonInterp 3 REQUIRED)
add_custom_target(check-doc add_custom_target(check-doc
COMMAND ${PYTHON_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/check.py ${CMAKE_CURRENT_SOURCE_DIR}/check.py
${CMAKE_SOURCE_DIR} ${ONNX_MLIR_SRC_ROOT}
--exclude_dirs third_party doc/doc_check/test) --exclude_dirs third_party doc/doc_check/test)

View File

@ -5,8 +5,9 @@ add_library(OMBuilder
FrontendDialectTransformer.hpp FrontendDialectTransformer.hpp
OpBuildTable.inc) OpBuildTable.inc)
target_include_directories(OMBuilder PRIVATE ${CMAKE_SOURCE_DIR}) target_include_directories(OMBuilder PRIVATE ${ONNX_MLIR_SRC_ROOT})
target_include_directories(OMBuilder PRIVATE ${CMAKE_BINARY_DIR}) target_include_directories(OMBuilder PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(OMBuilder PRIVATE ${ONNX_MLIR_BIN_ROOT})
target_link_libraries(OMBuilder target_link_libraries(OMBuilder
OMONNXOps OMONNXOps
@ -16,6 +17,6 @@ target_link_libraries(OMBuilder
mpark_variant) mpark_variant)
target_include_directories(OMBuilder target_include_directories(OMBuilder
PUBLIC PUBLIC
${CMAKE_SOURCE_DIR}/third_party/onnx ${ONNX_MLIR_SRC_ROOT}/third_party/onnx
${CMAKE_SOURCE_DIR}/third_party/variant ${ONNX_MLIR_SRC_ROOT}/third_party/variant
${CMAKE_SOURCE_DIR}) ${ONNX_MLIR_SRC_ROOT})

View File

@ -26,7 +26,8 @@ whole_archive_link_mlir(onnx-mlir
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
target_link_libraries(onnx-mlir ${ZLIB_LIBRARIES}) target_link_libraries(onnx-mlir ${ZLIB_LIBRARIES})
target_include_directories(onnx-mlir PRIVATE ${CMAKE_SOURCE_DIR}) 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 ${CMAKE_BINARY_DIR})
target_include_directories(onnx-mlir PRIVATE ${ONNX_MLIR_BIN_ROOT})
install(TARGETS onnx-mlir DESTINATION bin) install(TARGETS onnx-mlir DESTINATION bin)

View File

@ -1,6 +1,6 @@
set(LLVM_TARGET_DEFINITIONS ONNXOps.td) set(LLVM_TARGET_DEFINITIONS ONNXOps.td)
onnx_mlir_tablegen(ONNXOps.hpp.inc -gen-op-decls "-I${CMAKE_SOURCE_DIR}/compiler/pass") onnx_mlir_tablegen(ONNXOps.hpp.inc -gen-op-decls "-I${ONNX_MLIR_SRC_ROOT}/compiler/pass")
onnx_mlir_tablegen(ONNXOps.cpp.inc -gen-op-defs "-I${CMAKE_SOURCE_DIR}/compiler/pass") onnx_mlir_tablegen(ONNXOps.cpp.inc -gen-op-defs "-I${ONNX_MLIR_SRC_ROOT}/compiler/pass")
set(GEN_DOC_FILE ${CMAKE_BINARY_DIR}/docs/Dialects/onnx.md) set(GEN_DOC_FILE ${CMAKE_BINARY_DIR}/docs/Dialects/onnx.md)
add_public_tablegen_target(OMONNXOpsIncGen) add_public_tablegen_target(OMONNXOpsIncGen)