Index: cmake/modules/AddLLVM.cmake =================================================================== --- cmake/modules/AddLLVM.cmake +++ cmake/modules/AddLLVM.cmake @@ -1367,6 +1367,17 @@ COMMAND ${CMAKE_COMMAND} -E echo "${target} does nothing, no tools built.") message(STATUS "${target} does nothing.") endif() + + # Add lit test dependencies. + set(llvm_utils_deps + FileCheck count not + ) + foreach(dep ${llvm_utils_deps}) + if (TARGET ${dep}) + add_dependencies(${target} ${dep}) + endif() + endforeach() + if (ARG_DEPENDS) add_dependencies(${target} ${ARG_DEPENDS}) endif()