fix the cmakefile (#81)

Co-authored-by: Tian Jin <tjingrant@gmail.com>
This commit is contained in:
chentong319 2020-04-11 04:03:41 -04:00 committed by GitHub
parent caeaa390e2
commit 3119aebb50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -6,24 +6,19 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ONNXOps.td.inc
# Copy the generated files to respective destinations: # Copy the generated files to respective destinations:
# ONNXOps.td.inc -> src/Dialect/ONNX/ONNXOps.td.inc # ONNXOps.td.inc -> src/Dialect/ONNX/ONNXOps.td.inc
add_custom_command(OUTPUT ${ONNX_MLIR_SRC_ROOT}/src/Dialect/ONNX/ONNXOps.td.inc add_custom_target(OMONNXOpsTableGenIncGen
COMMAND ${CMAKE_COMMAND} -E copy COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/ONNXOps.td.inc ${CMAKE_CURRENT_SOURCE_DIR}/ONNXOps.td.inc
${ONNX_MLIR_SRC_ROOT}/src/Dialect/ONNX/ONNXOps.td.inc ${ONNX_MLIR_SRC_ROOT}/src/Dialect/ONNX/ONNXOps.td.inc
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ONNXOps.td.inc) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ONNXOps.td.inc)
# OpBuildTable.inc -> src/Builder/OpBuildTable.inc # OpBuildTable.inc -> src/Builder/OpBuildTable.inc
add_custom_command(OUTPUT ${ONNX_MLIR_SRC_ROOT}/src/Builder/OpBuildTable.inc add_custom_target(OMONNXOpsBuildTableIncGen
COMMAND ${CMAKE_COMMAND} -E copy COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/OpBuildTable.inc ${CMAKE_CURRENT_SOURCE_DIR}/OpBuildTable.inc
${ONNX_MLIR_SRC_ROOT}/src/Builder/OpBuildTable.inc ${ONNX_MLIR_SRC_ROOT}/src/Builder/OpBuildTable.inc
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/OpBuildTable.inc) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/OpBuildTable.inc)
add_custom_target(OMONNXOpsTableGenIncGen
DEPENDS ${ONNX_MLIR_SRC_ROOT}/src/Dialect/ONNX/ONNXOps.td.inc)
add_custom_target(OMONNXOpsBuildTableIncGen
DEPENDS ${ONNX_MLIR_SRC_ROOT}/src/Builder/OpBuildTable.inc)
add_custom_target(OMONNXOpsIncTranslation add_custom_target(OMONNXOpsIncTranslation
DEPENDS OMONNXOpsTableGenIncGen DEPENDS OMONNXOpsTableGenIncGen
OMONNXOpsBuildTableIncGen) OMONNXOpsBuildTableIncGen)