[Lldb-commits] [lldb] r311355 - [unittests] Build LLVMTestingSupport for out-of-source builds

Michal Gorny via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 21 10:41:39 PDT 2017

Author: mgorny
Date: Mon Aug 21 10:41:39 2017
New Revision: 311355

URL: http://llvm.org/viewvc/llvm-project?rev=311355&view=rev
[unittests] Build LLVMTestingSupport for out-of-source builds

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

Differential Revision: https://reviews.llvm.org/D36886


Modified: lldb/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/CMakeLists.txt?rev=311355&r1=311354&r2=311355&view=diff
--- lldb/trunk/unittests/CMakeLists.txt (original)
+++ lldb/trunk/unittests/CMakeLists.txt Mon Aug 21 10:41:39 2017
@@ -19,6 +19,12 @@ if (LLDB_BUILT_STANDALONE)
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET gtest)
     add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
+  # 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()
 function(add_lldb_unittest test_name)

More information about the lldb-commits mailing list