This revision was automatically updated to reflect the committed changes.
Closed by commit rL285865: [cmake] Build gtest from LLVM when building 
standalone (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D26245?vs=76709&id=76801#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26245

Files:
  lldb/trunk/unittests/CMakeLists.txt


Index: lldb/trunk/unittests/CMakeLists.txt
===================================================================
--- lldb/trunk/unittests/CMakeLists.txt
+++ lldb/trunk/unittests/CMakeLists.txt
@@ -12,6 +12,14 @@
 
 include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
 
+if (LLDB_BUILT_STANDALONE)
+  # 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()
+endif()
+
 function(add_lldb_unittest test_name)
   add_unittest(LLDBUnitTests
     ${test_name}


Index: lldb/trunk/unittests/CMakeLists.txt
===================================================================
--- lldb/trunk/unittests/CMakeLists.txt
+++ lldb/trunk/unittests/CMakeLists.txt
@@ -12,6 +12,14 @@
 
 include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
 
+if (LLDB_BUILT_STANDALONE)
+  # 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()
+endif()
+
 function(add_lldb_unittest test_name)
   add_unittest(LLDBUnitTests
     ${test_name}
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to