[llvm] r373596 - [llvm-locstats] Copy the script only when needed; NFC
Djordje Todorovic via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 06:18:14 PDT 2019
Author: djtodoro
Date: Thu Oct 3 06:18:14 2019
New Revision: 373596
URL: http://llvm.org/viewvc/llvm-project?rev=373596&view=rev
Log:
[llvm-locstats] Copy the script only when needed; NFC
Modified:
llvm/trunk/utils/llvm-locstats/CMakeLists.txt
Modified: llvm/trunk/utils/llvm-locstats/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-locstats/CMakeLists.txt?rev=373596&r1=373595&r2=373596&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-locstats/CMakeLists.txt (original)
+++ llvm/trunk/utils/llvm-locstats/CMakeLists.txt Thu Oct 3 06:18:14 2019
@@ -1,7 +1,12 @@
if (LLVM_BUILD_UTILS AND LLVM_BUILD_TOOLS)
- add_custom_target(llvm-locstats ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
+ add_custom_command(
+ 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}"
)
+ add_custom_target(llvm-locstats ALL
+ DEPENDS ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
+ )
set_target_properties(llvm-locstats PROPERTIES FOLDER "Tools")
endif()
More information about the llvm-commits
mailing list