From 30efc0695768ec64b02c4a4fd4bbc9efb88b7075 Mon Sep 17 00:00:00 2001 From: Jeremy Kun Date: Fri, 20 Oct 2023 12:22:14 -0700 Subject: [PATCH] add CMake build files --- lib/CMakeLists.txt | 3 +- lib/Conversion/CMakeLists.txt | 1 + lib/Conversion/PolyToStandard/CMakeLists.txt | 29 ++++++++++++++++++++ lib/Dialect/Poly/CMakeLists.txt | 2 +- tools/CMakeLists.txt | 3 +- 5 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 lib/Conversion/CMakeLists.txt create mode 100644 lib/Conversion/PolyToStandard/CMakeLists.txt diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index f66a974..714031d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(Dialect) -add_subdirectory(Transform) \ No newline at end of file +add_subdirectory(Conversion) +add_subdirectory(Transform) diff --git a/lib/Conversion/CMakeLists.txt b/lib/Conversion/CMakeLists.txt new file mode 100644 index 0000000..fb91c06 --- /dev/null +++ b/lib/Conversion/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(PolyToStandard) diff --git a/lib/Conversion/PolyToStandard/CMakeLists.txt b/lib/Conversion/PolyToStandard/CMakeLists.txt new file mode 100644 index 0000000..703b2f7 --- /dev/null +++ b/lib/Conversion/PolyToStandard/CMakeLists.txt @@ -0,0 +1,29 @@ +set(LLVM_TARGET_DEFINITIONS PolyToStandard.td) +mlir_tablegen(Passes.h.inc -gen-pass-decls -name Conversion) +mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Conversion) +mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Conversion) +add_dependencies(mlir-headers MLIRPolyOpsIncGen) +add_public_tablegen_target(MLIRPolyToStandardPassIncGen) + +add_mlir_doc(PolyToStandard PolyToStandard PolyToStandard/ -gen-pass-doc) + +add_mlir_conversion_library(MLIRPolyToStandard + PolyToStandard.cpp + + DEPENDS + MLIRPolyToStandardPassIncGen + + LINK_COMPONENTS + Core + + LINK_LIBS PUBLIC + MLIRPoly + MLIRArithDialect + MLIRFuncDialect + MLIRFuncTransforms + MLIRIR + MLIRPass + MLIRSCFDialect + MLIRTensorDialect + MLIRTransforms + ) diff --git a/lib/Dialect/Poly/CMakeLists.txt b/lib/Dialect/Poly/CMakeLists.txt index 628253c..f001992 100644 --- a/lib/Dialect/Poly/CMakeLists.txt +++ b/lib/Dialect/Poly/CMakeLists.txt @@ -24,4 +24,4 @@ add_mlir_dialect_library(MLIRPoly ${PROJECT_SOURCE_DIR}/lib/Dialect/Poly LINK_LIBS PUBLIC - ) \ No newline at end of file + ) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 930bb80..59f33b1 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -9,6 +9,7 @@ set (LIBS MulToAdd MLIROptLib MLIRPass + PolyToStandard ) add_llvm_executable(tutorial-opt tutorial-opt.cpp) @@ -16,4 +17,4 @@ add_llvm_executable(tutorial-opt tutorial-opt.cpp) llvm_update_compile_flags(tutorial-opt) target_link_libraries(tutorial-opt PRIVATE ${LIBS}) -mlir_check_all_link_libraries(tutorial-opt) \ No newline at end of file +mlir_check_all_link_libraries(tutorial-opt)