llvm-project/mlir/test/CAPI/CMakeLists.txt
River Riddle 23aa5a7446 [mlir] Rename the Standard dialect to the Func dialect
The last remaining operations in the standard dialect all revolve around
FuncOp/function related constructs. This patch simply handles the initial
renaming (which by itself is already huge), but there are a large number
of cleanups unlocked/necessary afterwards:

* Removing a bunch of unnecessary dependencies on Func
* Cleaning up the From/ToStandard conversion passes
* Preparing for the move of FuncOp to the Func dialect

See the discussion at https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061

Differential Revision: https://reviews.llvm.org/D120624
2022-03-01 12:10:04 -08:00

80 lines
1.6 KiB
CMake

function(_add_capi_test_executable name)
cmake_parse_arguments(ARG
""
""
"LINK_LIBS"
${ARGN})
set(LLVM_LINK_COMPONENTS
)
add_llvm_executable(${name}
PARTIAL_SOURCES_INTENDED
${ARG_UNPARSED_ARGUMENTS})
llvm_update_compile_flags(${name})
if(MLIR_BUILD_MLIR_C_DYLIB)
target_link_libraries(${name} PRIVATE
MLIR-C)
else()
target_link_libraries(${name} PRIVATE
${ARG_LINK_LIBS})
endif()
endfunction(_add_capi_test_executable)
# Only enable the ExecutionEngine if the native target is configured in.
if(TARGET ${LLVM_NATIVE_ARCH})
_add_capi_test_executable(mlir-capi-execution-engine-test
execution_engine.c
LINK_LIBS PRIVATE
MLIRCAPIConversion
MLIRCAPIExecutionEngine
MLIRCAPIRegistration
)
endif()
_add_capi_test_executable(mlir-capi-ir-test
ir.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPIFunc
MLIRCAPIRegistration
)
_add_capi_test_executable(mlir-capi-llvm-test
llvm.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPILLVM
MLIRCAPIRegistration
)
_add_capi_test_executable(mlir-capi-pass-test
pass.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPIRegistration
MLIRCAPITransforms
)
_add_capi_test_executable(mlir-capi-sparse-tensor-test
sparse_tensor.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPIRegistration
MLIRCAPISparseTensor
)
_add_capi_test_executable(mlir-capi-quant-test
quant.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPIRegistration
MLIRCAPIQuant
)
_add_capi_test_executable(mlir-capi-pdl-test
pdl.c
LINK_LIBS PRIVATE
MLIRCAPIIR
MLIRCAPIRegistration
MLIRCAPIPDL
)