[clang][cmake] Add option to control hmaptool installation (#172725)

This commit is contained in:
Ken Matsui 2026-03-04 08:32:55 -05:00 committed by GitHub
parent 47766d7f8c
commit c2e22e3b79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,13 @@
install(PROGRAMS hmaptool DESTINATION "${CLANG_TOOLS_INSTALL_DIR}" COMPONENT hmaptool)
option(CLANG_INSTALL_HMAPTOOL "Install hmaptool" ON)
if(CLANG_INSTALL_HMAPTOOL)
install(PROGRAMS hmaptool DESTINATION "${CLANG_TOOLS_INSTALL_DIR}" COMPONENT hmaptool)
endif()
add_custom_target(hmaptool ALL DEPENDS "hmaptool")
set_target_properties(hmaptool PROPERTIES FOLDER "Clang/Utils")
if(NOT LLVM_ENABLE_IDE)
if(CLANG_INSTALL_HMAPTOOL AND NOT LLVM_ENABLE_IDE)
add_llvm_install_targets("install-hmaptool"
DEPENDS hmaptool
COMPONENT hmaptool)