Ericson2314 added inline comments.
================ 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") ---------------- tstellar wrote: > mizvekov wrote: > > tstellar wrote: > > > Should this be LLVM_TOOLS_BINARY_DIR ? > > I think LLVM_UTILS_INSTALL_DIR is the path where the programs will be > > installed, and LLVM_TOOLS_BINARY_DIR is where they are located in the build > > tree. > > > > So I think the idea is that this install invocation will install the file, > > for the packaging for example, while add_custom_command above will just > > copy this program into the build tree so that llvm-lit will find it when > > run from the build tree. > OK, I see. Makes sense. That is right about `INSTALL_DIR` vs `BINARY_DIR`, but `LLVM_UTILS_INSTALL_DIR` and `LLVM_TOOLS_BINARY_DIR` both exist. At least after https://reviews.llvm.org/D117977 `CLANG_` ones would exist, which would make more sense for this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126308/new/ https://reviews.llvm.org/D126308 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits