Stop the build if cyclic library dependecies found.

llvm-svn: 115405
This commit is contained in:
Oscar Fuentes 2010-10-02 03:04:49 +00:00
parent 62a4818bf8
commit 8f7c23d134

View File

@ -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.")