2021-06-23 19:28:17 +00:00
|
|
|
From c6b921c8d833546946b70a8c2640032fd7c62461 Mon Sep 17 00:00:00 2001
|
2020-08-19 12:13:45 +00:00
|
|
|
From: serge-sans-paille <sguelton@redhat.com>
|
2021-06-23 19:28:17 +00:00
|
|
|
Date: Thu, 25 Feb 2021 14:04:52 +0100
|
|
|
|
Subject: [PATCH 1/6] [PATCH][clang] Reorganize gtest integration
|
2020-08-19 12:13:45 +00:00
|
|
|
|
|
|
|
---
|
2021-06-23 19:28:17 +00:00
|
|
|
clang/CMakeLists.txt | 12 +++++-------
|
2020-08-19 12:13:45 +00:00
|
|
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
|
|
|
|
2021-06-23 19:28:17 +00:00
|
|
|
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
|
|
|
|
index 9e74014..0185276 100644
|
|
|
|
--- a/clang/CMakeLists.txt
|
|
|
|
+++ b/clang/CMakeLists.txt
|
|
|
|
@@ -153,12 +153,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
|
2020-08-19 12:13:45 +00:00
|
|
|
set(LLVM_UTILS_PROVIDED ON)
|
|
|
|
set(CLANG_TEST_DEPS FileCheck count not)
|
|
|
|
endif()
|
|
|
|
- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/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} utils/unittest)
|
|
|
|
- endif()
|
|
|
|
else()
|
|
|
|
# Seek installed Lit.
|
|
|
|
find_program(LLVM_LIT
|
2021-06-23 19:28:17 +00:00
|
|
|
@@ -537,7 +531,11 @@ endif()
|
2020-08-19 12:13:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
if( CLANG_INCLUDE_TESTS )
|
|
|
|
- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
|
|
|
|
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/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} utils/unittest)
|
|
|
|
add_subdirectory(unittests)
|
|
|
|
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
|
|
|
list(APPEND CLANG_TEST_PARAMS
|
|
|
|
--
|
2021-06-23 19:28:17 +00:00
|
|
|
1.8.3.1
|
2020-08-19 12:13:45 +00:00
|
|
|
|