From c2e22e3b797da806e8d67eb5dafd31b425d0c1af Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Wed, 4 Mar 2026 08:32:55 -0500 Subject: [PATCH] [clang][cmake] Add option to control hmaptool installation (#172725) --- clang/utils/hmaptool/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt index 02b29e4fba2f..2891c29263a5 100644 --- a/clang/utils/hmaptool/CMakeLists.txt +++ b/clang/utils/hmaptool/CMakeLists.txt @@ -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)