llvm/mlir/lib/IR/CMakeLists.txt

if(MLIR_ENABLE_PDL_IN_PATTERNMATCH)
  set(pdl_src
    PDL/PDLPatternMatch.cpp
  )
endif()

add_mlir_library(MLIRIR
  AffineExpr.cpp
  AffineMap.cpp
  AsmPrinter.cpp
  Attributes.cpp
  AttrTypeSubElements.cpp
  Block.cpp
  Builders.cpp
  BuiltinAttributeInterfaces.cpp
  BuiltinAttributes.cpp
  BuiltinDialect.cpp
  BuiltinDialectBytecode.cpp
  BuiltinTypes.cpp
  BuiltinTypeInterfaces.cpp
  Diagnostics.cpp
  Dialect.cpp
  DialectResourceBlobManager.cpp
  Dominance.cpp
  ExtensibleDialect.cpp
  IntegerSet.cpp
  Location.cpp
  MLIRContext.cpp
  ODSSupport.cpp
  Operation.cpp
  OperationSupport.cpp
  PatternMatch.cpp
  Region.cpp
  RegionKindInterface.cpp
  SymbolTable.cpp
  TensorEncoding.cpp
  Types.cpp
  TypeRange.cpp
  TypeUtilities.cpp
  Unit.cpp
  Value.cpp
  ValueRange.cpp
  Verifier.cpp
  Visitors.cpp
  ${pdl_src}

  ADDITIONAL_HEADER_DIRS
  ${MLIR_MAIN_INCLUDE_DIR}/mlir/IR

  DEPENDS
  MLIRBuiltinAttributesIncGen
  MLIRBuiltinAttributeInterfacesIncGen
  MLIRBuiltinDialectBytecodeIncGen
  MLIRBuiltinDialectIncGen
  MLIRBuiltinLocationAttributesIncGen
  MLIRBuiltinOpsIncGen
  MLIRBuiltinTypesIncGen
  MLIRBuiltinTypeConstraintsIncGen
  MLIRBuiltinTypeInterfacesIncGen
  MLIRCallInterfacesIncGen
  MLIRCastInterfacesIncGen
  MLIRDataLayoutInterfacesIncGen
  MLIROpAsmInterfaceIncGen
  MLIRRegionKindInterfaceIncGen
  MLIRSideEffectInterfacesIncGen
  MLIRSymbolInterfacesIncGen
  MLIRTensorEncodingIncGen

  LINK_LIBS PUBLIC
  MLIRSupport
  )