Blame SOURCES/0002-gtest-reorg.patch

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