Install torch-mlir binaries (#421)

In addition, use add_llvm_executable so that the relative rpath of
the installed binaries is set properly.
pull/531/head
stephenneuendorffer 2022-01-20 08:20:54 -08:00 committed by GitHub
parent 76728491cb
commit c8ee8d02eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,11 @@
# torch-mlir-lsp-server is always linked dynamically as we want to distribute the
# binaries with the python packages for hacking/debugging.
add_executable(torch-mlir-lsp-server torch-mlir-lsp-server.cpp)
add_llvm_executable(torch-mlir-lsp-server torch-mlir-lsp-server.cpp)
install(TARGETS torch-mlir-lsp-server
EXPORT TorchMLIRTargets
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
COMPONENT torch-mlir-lsp-server)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)

View File

@ -1,4 +1,9 @@
add_executable(torch-mlir-opt torch-mlir-opt.cpp)
add_llvm_executable(torch-mlir-opt torch-mlir-opt.cpp)
install(TARGETS torch-mlir-opt
EXPORT TorchMLIRTargets
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
COMPONENT torch-mlir-opt)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)