[Lldb-commits] [PATCH] D26245: [cmake] Build gtest from LLVM when building standalone

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 2 08:19:52 PDT 2016

mgorny created this revision.
mgorny added reviewers: beanz, zturner.
mgorny added a subscriber: lldb-commits.

Include the gtest utility directory from LLVM sources when performing
a stand-alone build of LLDB. This is necessary to have a correct gtest
library to link tests against, as the one used by LLVM is not installed
(and not supposed to be). This is the same approach as used in clang.



Index: unittests/CMakeLists.txt
--- unittests/CMakeLists.txt
+++ unittests/CMakeLists.txt
@@ -12,6 +12,14 @@
+  # Build the gtest library needed for unittests, if we have LLVM sources
+  # handy.
+  if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+    add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
+  endif()
 function(add_lldb_unittest test_name)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26245.76709.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161102/14bc3e28/attachment.bin>

More information about the lldb-commits mailing list