forked from OSchip/llvm-project
Add some CMake rules for installing headers, mlir-tblgen, and mlir-opt
Closes tensorflow/mlir#246 PiperOrigin-RevId: 281442685
This commit is contained in:
parent
f868adafee
commit
88368a19aa
|
@ -56,3 +56,31 @@ add_subdirectory(test)
|
|||
if( LLVM_INCLUDE_EXAMPLES )
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/mlir include/mlir-c
|
||||
DESTINATION include
|
||||
COMPONENT mlir-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "*.inc"
|
||||
PATTERN "LICENSE.TXT"
|
||||
)
|
||||
|
||||
install(DIRECTORY ${MLIR_INCLUDE_DIR}/mlir ${MLIR_INCLUDE_DIR}/mlir-c
|
||||
DESTINATION include
|
||||
COMPONENT mlir-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "*.gen"
|
||||
PATTERN "*.inc"
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
PATTERN "config.h" EXCLUDE
|
||||
)
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-mlir-headers
|
||||
DEPENDS mlir-headers
|
||||
COMPONENT mlir-headers)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -56,7 +56,7 @@ if(MLIR_CUDA_CONVERSIONS_ENABLED)
|
|||
MLIRGPUtoCUDATransforms
|
||||
)
|
||||
endif()
|
||||
add_llvm_executable(mlir-opt
|
||||
add_llvm_tool(mlir-opt
|
||||
mlir-opt.cpp
|
||||
)
|
||||
llvm_update_compile_flags(mlir-opt)
|
||||
|
|
Loading…
Reference in New Issue