summaryrefslogtreecommitdiffstats
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-10-02 03:04:49 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-10-02 03:04:49 +0000
commitb32944d21419b7b6ba476619e703529e6c3dd646 (patch)
treecd20f3c4e0821bb0bcfd07416f2cba0b05c81d93 /tools/llvm-config
parent858a19b3f30b60eaaf4ad5715e87e1719013cb32 (diff)
downloadexternal_llvm-b32944d21419b7b6ba476619e703529e6c3dd646.zip
external_llvm-b32944d21419b7b6ba476619e703529e6c3dd646.tar.gz
external_llvm-b32944d21419b7b6ba476619e703529e6c3dd646.tar.bz2
Stop the build if cyclic library dependecies found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
index 663cae5..cf672a4 100644
--- a/tools/llvm-config/CMakeLists.txt
+++ b/tools/llvm-config/CMakeLists.txt
@@ -80,8 +80,11 @@ add_custom_command(OUTPUT ${LIBDEPS}
DEPENDS ${LIBDEPS_TMP}
COMMENT "Updating ${LIBDEPS} if necessary...")
+# This must stop the build if find-cycles.pl returns error:
add_custom_command(OUTPUT ${FINAL_LIBDEPS}
- COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/find-cycles.pl < ${LIBDEPS} > ${FINAL_LIBDEPS} || ${CMAKE_COMMAND} -E remove -f ${FINAL_LIBDEPS}
+ COMMAND ${CMAKE_COMMAND} -E remove -f ${FINAL_LIBDEPS} ${FINAL_LIBDEPS}.tmp
+ COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/find-cycles.pl < ${LIBDEPS} > ${FINAL_LIBDEPS}.tmp
+ COMMAND ${CMAKE_COMMAND} -E copy ${FINAL_LIBDEPS}.tmp ${FINAL_LIBDEPS}
DEPENDS ${LIBDEPS}
COMMENT "Checking for cyclic dependencies between LLVM libraries.")