[Lldb-commits] [PATCH] D36886: [unittests] Build LLVMTestingSupport for out-of-source builds

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 18 11:17:34 PDT 2017


mgorny created this revision.
mgorny added a project: LLDB.

The Process/gdb-remote test now requires the LLVMTestingSupport library
that is not installed by LLVM. As a result, when doing an out-of-source
build it fails being unable to find the library. To solve that, build
a local copy of the library when building LLDB with unittests and LLVM
sources available. This is based on how we deal with bundled gtest
sources.


Repository:
  rL LLVM

https://reviews.llvm.org/D36886

Files:
  unittests/CMakeLists.txt


Index: unittests/CMakeLists.txt
===================================================================
--- unittests/CMakeLists.txt
+++ unittests/CMakeLists.txt
@@ -19,6 +19,12 @@
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET gtest)
     add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
   endif()
+  # LLVMTestingSupport library is needed for Process/gdb-remote.
+  if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
+      AND NOT TARGET LLVMTestingSupport)
+    add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
+      lib/Testing/Support)
+  endif()
 endif()
 
 function(add_lldb_unittest test_name)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36886.111710.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170818/31222b7f/attachment.bin>


More information about the lldb-commits mailing list