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