aboutsummaryrefslogtreecommitdiff
path: root/utils/llvm-locstats/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'utils/llvm-locstats/CMakeLists.txt')
-rw-r--r--utils/llvm-locstats/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/llvm-locstats/CMakeLists.txt b/utils/llvm-locstats/CMakeLists.txt
new file mode 100644
index 000000000000..a919023e141e
--- /dev/null
+++ b/utils/llvm-locstats/CMakeLists.txt
@@ -0,0 +1,12 @@
+if (LLVM_BUILD_UTILS AND LLVM_BUILD_TOOLS)
+ 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()