Got C++ unit tests running on Linux again
authorVince Harron <vharron@google.com>
Sun, 11 Jan 2015 09:42:12 +0000 (09:42 +0000)
committerVince Harron <vharron@google.com>
Sun, 11 Jan 2015 09:42:12 +0000 (09:42 +0000)
llvm-svn: 225604

lldb/gtest/make/Makefile.rules

index aba4e87..913be0c 100644 (file)
@@ -9,8 +9,13 @@ ifneq ($(wildcard $(THIS_FILE_DIR)../../llvm/utils/unittest/googletest),)
     # Assume lldb/llvm (MacOSX Xcode) directory form.
     LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../llvm)
 else
-    # Assume llvm/tools/lldb (Non-MacOSX) directory form.
-    LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../..)
+    ifneq ($(wildcard $(THIS_FILE_DIR)../../../llvm/utils/unittest/googletest),)
+        # Assume lldb/llvm side-by-side configuration (with symbolic links)
+        LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../llvm)
+    else
+        # Assume llvm/tools/lldb (Non-MacOSX) directory form.
+        LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../..)
+    endif
 endif
 
 ifeq ($(GTEST_DIR),)
@@ -88,4 +93,4 @@ include $(realpath $(THIS_FILE_DIR)../../test/make/Makefile.rules)
 test:: $(EXE)
        $(realpath $(EXE))
 
-endif
\ No newline at end of file
+endif