From d61ef7c46d11d31f5983ce87997244168d3b64e1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 9 Oct 2019 20:36:29 +0000 Subject: [PATCH] [CMake] Fix add_lldb_test_dependency This function would ignore all but the first argument. Now it correctly adds every dependency by iterating over its arguments. llvm-svn: 374216 --- lldb/cmake/modules/AddLLDB.cmake | 6 ++++-- lldb/test/CMakeLists.txt | 16 ++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index f6402f94385c..ef1e1df4c68f 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -27,8 +27,10 @@ function(lldb_tablegen) endif() endfunction(lldb_tablegen) -function(add_lldb_test_dependency name) - add_dependencies(lldb-test-deps ${name}) +function(add_lldb_test_dependency) + foreach(dependency ${ARGN}) + add_dependencies(lldb-test-deps ${dependency}) + endforeach() endfunction(add_lldb_test_dependency) function(add_lldb_library name) diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index d54e9ce010bf..d13b13950462 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -70,6 +70,14 @@ else() endif() endif() +if(NOT LLDB_BUILT_STANDALONE) + add_lldb_test_dependency( + FileCheck + count + not + ) +endif() + # the value is not canonicalized within LLVM llvm_canonicalize_cmake_booleans( LLDB_DISABLE_PYTHON @@ -100,14 +108,6 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Shell/lit-lldb-init.in ${CMAKE_CURRENT_BINARY_DIR}/Shell/lit-lldb-init) -if(NOT LLDB_BUILT_STANDALONE) - add_lldb_test_dependency( - FileCheck - count - not - ) -endif() - add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR}