Blame 0002-gtest-reorg.patch

a552a96
From 1f26a0284925859b72ee520ce74452d77d822409 Mon Sep 17 00:00:00 2001
a552a96
From: serge-sans-paille <sguelton@redhat.com>
a552a96
Date: Mon, 28 Jan 2019 19:12:27 +0000
a552a96
Subject: [PATCH 2/2] [PATCH] gtest reorg
a552a96
a552a96
---
a552a96
 CMakeLists.txt | 12 +++++-------
a552a96
 1 file changed, 5 insertions(+), 7 deletions(-)
a552a96
a552a96
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
a552a96
index c2016a45ca..48ea3c3bb9 100644
a552a96
--- a/clang/CMakeLists.txt
a552a96
+++ b/clang/CMakeLists.txt
a552a96
@@ -157,12 +157,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
a552a96
         set(LLVM_UTILS_PROVIDED ON)
a552a96
         set(CLANG_TEST_DEPS FileCheck count not)
a552a96
       endif()
a552a96
-      set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
a552a96
-      if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
a552a96
-          AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
a552a96
-          AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
a552a96
-        add_subdirectory(${UNITTEST_DIR} utils/unittest)
a552a96
-      endif()
a552a96
     else()
a552a96
       # Seek installed Lit.
a552a96
       find_program(LLVM_LIT
a552a96
@@ -507,7 +501,11 @@ endif()
a552a96
 
a552a96
 
a552a96
 if( CLANG_INCLUDE_TESTS )
a552a96
-  if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
a552a96
+  set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
a552a96
+  if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
a552a96
+      AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
a552a96
+      AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
a552a96
+    add_subdirectory(${UNITTEST_DIR} utils/unittest)
a552a96
     add_subdirectory(unittests)
a552a96
     list(APPEND CLANG_TEST_DEPS ClangUnitTests)
a552a96
     list(APPEND CLANG_TEST_PARAMS
a552a96
-- 
a552a96
2.19.2
a552a96