[llvm-locstats] Copy the script only when needed; NFC

llvm-svn: 373596
This commit is contained in:
Djordje Todorovic 2019-10-03 13:18:14 +00:00
parent 53ff87f900
commit e7e0259a88

View File

@ -1,7 +1,12 @@
if (LLVM_BUILD_UTILS AND LLVM_BUILD_TOOLS) if (LLVM_BUILD_UTILS AND LLVM_BUILD_TOOLS)
add_custom_target(llvm-locstats ALL add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats OUTPUT ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
DEPENDS ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py
COMMAND ${CMAKE_COMMAND} -E copy ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
COMMENT "Copying llvm-locstats into ${LLVM_TOOLS_BINARY_DIR}" COMMENT "Copying llvm-locstats into ${LLVM_TOOLS_BINARY_DIR}"
) )
add_custom_target(llvm-locstats ALL
DEPENDS ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
)
set_target_properties(llvm-locstats PROPERTIES FOLDER "Tools") set_target_properties(llvm-locstats PROPERTIES FOLDER "Tools")
endif() endif()