43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From cfd535d718631c1266baa628904ddfa95284427d Mon Sep 17 00:00:00 2001
|
|
From: serge-sans-paille <sguelton@redhat.com>
|
|
Date: Thu, 25 Feb 2021 14:04:52 +0100
|
|
Subject: [PATCH] Reorganize gtest integration
|
|
|
|
---
|
|
clang/CMakeLists.txt | 12 +++++-------
|
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
|
|
index be59c199f05f..3f882f7aca59 100644
|
|
--- a/clang/CMakeLists.txt
|
|
+++ b/clang/CMakeLists.txt
|
|
@@ -118,12 +118,6 @@ 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()
|
|
|
|
if(LLVM_LIT)
|
|
@@ -506,7 +500,11 @@ endif()
|
|
|
|
|
|
if( CLANG_INCLUDE_TESTS )
|
|
- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/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} third-party/unittest)
|
|
add_subdirectory(unittests)
|
|
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
|
list(APPEND CLANG_TEST_PARAMS
|
|
--
|
|
2.39.1
|
|
|