Blame SOURCES/0002-gtest-reorg.patch

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