Remove third party stuff and use gtest patch
This commit is contained in:
parent
0d77a0c30a
commit
7ac8248795
53
D138472.diff
Normal file
53
D138472.diff
Normal file
@ -0,0 +1,53 @@
|
||||
From 04ee57212326f872b6f9402eff438220396ca763 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Kleine <kkleine@redhat.com>
|
||||
Date: Mon, 23 Jan 2023 13:14:17 +0000
|
||||
Subject: [PATCH] Rebased D138472
|
||||
|
||||
---
|
||||
clang/CMakeLists.txt | 23 ++++++++++-------------
|
||||
1 file changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
|
||||
index 090cfa352078..69652733e2f2 100644
|
||||
--- a/clang/CMakeLists.txt
|
||||
+++ b/clang/CMakeLists.txt
|
||||
@@ -118,12 +118,11 @@ if(CLANG_BUILT_STANDALONE)
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
set(CLANG_TEST_DEPS FileCheck count not)
|
||||
endif()
|
||||
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
|
||||
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
|
||||
- AND NOT EXISTS ${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
|
||||
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
|
||||
- endif()
|
||||
+ endif()
|
||||
+
|
||||
+ find_package(LLVMGTest)
|
||||
+ if (NOT TARGET llvm_gtest)
|
||||
+ message(FATAL_ERROR "llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF")
|
||||
endif()
|
||||
|
||||
if(LLVM_LIT)
|
||||
@@ -506,13 +505,11 @@ endif()
|
||||
|
||||
|
||||
if( CLANG_INCLUDE_TESTS )
|
||||
- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h)
|
||||
- add_subdirectory(unittests)
|
||||
- list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
- list(APPEND CLANG_TEST_PARAMS
|
||||
- clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
|
||||
- )
|
||||
- endif()
|
||||
+ add_subdirectory(unittests)
|
||||
+ list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
+ list(APPEND CLANG_TEST_PARAMS
|
||||
+ clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
|
||||
+ )
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(bindings/python/tests)
|
||||
|
||||
--
|
||||
2.34.3
|
||||
|
@ -67,6 +67,9 @@ Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch
|
||||
# Make clangBasic and clangDriver depend on LLVMTargetParser
|
||||
# See https://reviews.llvm.org/D141581
|
||||
Patch7: D141581.diff
|
||||
# clang/cmake: Use installed gtest libraries for stand-alone builds
|
||||
# See https://reviews.llvm.org/D138472
|
||||
Patch8: D138472.diff
|
||||
|
||||
%if %{without compat_build}
|
||||
# Patches for clang-tools-extra
|
||||
|
Loading…
Reference in New Issue
Block a user