summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-27 07:22:59 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-27 07:22:59 +0000
commit41bf0bc71a1dd3d5a6c0cb8d1eae2ab36790b6c4 (patch)
tree80d0496fcb406d906c7bddb682a7454c618e7855 /cmake
parentf0aa38d58a8fe34f444d04a2eb67569f47259364 (diff)
[CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary work
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 357e0a5e5..743ca960e 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -138,9 +138,11 @@ endmacro()
macro(add_compiler_rt_resource_file target_name file_name)
set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}")
set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}")
- add_custom_target(${target_name}
+ add_custom_command(OUTPUT ${dst_file}
+ DEPENDS ${src_file}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file}
- DEPENDS ${file_name})
+ COMMENT "Copying ${file_name}...")
+ add_custom_target(${target_name} DEPENDS ${dst_file})
# Install in Clang resource directory.
install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH})
endmacro()