[PATCH] D126308: cmake: use llvm dir variables for clang/utils/hmaptool

Tom Stellard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 11:52:48 PDT 2022


tstellar added a comment.

This



================
Comment at: clang/utils/hmaptool/CMakeLists.txt:5
 
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}
-                   COMMAND ${CMAKE_COMMAND} -E make_directory
-                     ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin
-                   COMMAND ${CMAKE_COMMAND} -E copy
-                     ${CMAKE_CURRENT_SOURCE_DIR}/${CLANG_HMAPTOOL}
-                     ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/
-                   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${CLANG_HMAPTOOL})
-
-list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
-install(PROGRAMS ${CLANG_HMAPTOOL}
-        DESTINATION "${CMAKE_INSTALL_BINDIR}"
-        COMPONENT hmaptool)
-
-add_custom_target(hmaptool ALL DEPENDS ${Depends})
+install(PROGRAMS hmaptool DESTINATION "${LLVM_UTILS_INSTALL_DIR}}" COMPONENT hmaptool)
+add_custom_target(hmaptool ALL DEPENDS "${LLVM_TOOLS_BINARY_DIR}/hmaptool")
----------------
Should this be LLVM_TOOLS_BINARY_DIR ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126308/new/

https://reviews.llvm.org/D126308



More information about the cfe-commits mailing list