llvm-project/mlir/test/lib/IR/CMakeLists.txt
Nikita Popov 88f8956711 [mlir] Fix MLIRTestDialect dependency in MLIRTestIR
This is a test library which is not part of libMLIR, so it should
use normal LINK_LIBS instead of mlir_target_link_libraries.

This fixes an issue introduced in #123910 and follows up on the
fix in #125004, which added the library to DEPENDS, which is not
sufficient.
2025-02-11 14:59:41 +01:00

46 lines
963 B
CMake

# Exclude tests from libMLIR.so
add_mlir_library(MLIRTestIR
TestAffineWalk.cpp
TestBytecodeRoundtrip.cpp
TestBuiltinAttributeInterfaces.cpp
TestBuiltinDistinctAttributes.cpp
TestClone.cpp
TestDiagnostics.cpp
TestDiagnosticsMetadata.cpp
TestDominance.cpp
TestFunc.cpp
TestInterfaces.cpp
TestMatchers.cpp
TestLazyLoading.cpp
TestOpaqueLoc.cpp
TestOperationEquals.cpp
TestPrintDefUse.cpp
TestPrintInvalid.cpp
TestPrintNesting.cpp
TestSideEffects.cpp
TestSlicing.cpp
TestSymbolUses.cpp
TestRegions.cpp
TestTypes.cpp
TestUseListOrders.cpp
TestVisitors.cpp
TestVisitorsGeneric.cpp
EXCLUDE_FROM_LIBMLIR
LINK_LIBS PUBLIC
MLIRTestDialect
)
mlir_target_link_libraries(MLIRTestIR PUBLIC
MLIRPass
MLIRBytecodeReader
MLIRBytecodeWriter
MLIRFunctionInterfaces
)
target_include_directories(MLIRTestIR
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../Dialect/Test
${CMAKE_CURRENT_BINARY_DIR}/../Dialect/Test
)