[clang-tools-extra] r301762 - clang-tools-extra/test/CMakeLists.txt: Rework r297806 (D29851) to make sure test utils should be built.

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 29 20:19:04 PDT 2017


Author: chapuni
Date: Sat Apr 29 22:19:04 2017
New Revision: 301762

URL: http://llvm.org/viewvc/llvm-project?rev=301762&view=rev
Log:
clang-tools-extra/test/CMakeLists.txt: Rework r297806 (D29851) to make sure test utils should be built.

FIXME: This may be moved to llvm's add_lit_target().

Modified:
    clang-tools-extra/trunk/test/CMakeLists.txt

Modified: clang-tools-extra/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/CMakeLists.txt?rev=301762&r1=301761&r2=301762&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/test/CMakeLists.txt Sat Apr 29 22:19:04 2017
@@ -55,12 +55,15 @@ set(CLANG_TOOLS_TEST_DEPS
   ExtraToolsUnitTests
   )
 
-if(NOT LLVM_UTILS_PROVIDED)
-  list(APPEND CLANG_TOOLS_TEST_DEPS
-    # Base line deps.
-    FileCheck count not
-    )
-endif()
+set(llvm_utils
+  FileCheck count not
+  )
+
+foreach(t ${llvm_utils})
+  if(TARGET ${t})
+    list(APPEND CLANG_TOOLS_TEST_DEPS ${t})
+  endif()
+endforeach()
 
 add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests"
   ${CMAKE_CURRENT_BINARY_DIR}




More information about the cfe-commits mailing list