[clang] 8a084f6 - Revert "Move googletest to the third-party directory"
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 11:38:03 PST 2022
Author: Tom Stellard
Date: 2022-11-09T11:34:59-08:00
New Revision: 8a084f68c8a1cac99d9fa0fbcf490b53ab3b6e0c
URL: https://github.com/llvm/llvm-project/commit/8a084f68c8a1cac99d9fa0fbcf490b53ab3b6e0c
DIFF: https://github.com/llvm/llvm-project/commit/8a084f68c8a1cac99d9fa0fbcf490b53ab3b6e0c.diff
LOG: Revert "Move googletest to the third-party directory"
This reverts commit 59052468c3e38cab15582cefbb5133fd4c2ffce5.
It looks like this patch breaks the build when compiler-rt is passed to
LLVM_ENABLE_PROJECTS instead of LLVM_ENABLE_RUNTIMES.
Added:
llvm/utils/unittest/CMakeLists.txt
llvm/utils/unittest/UnitTestMain/CMakeLists.txt
llvm/utils/unittest/UnitTestMain/TestMain.cpp
llvm/utils/unittest/googlemock/LICENSE.txt
llvm/utils/unittest/googlemock/README.LLVM
llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h
llvm/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
llvm/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h
llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
llvm/utils/unittest/googlemock/include/gmock/gmock.h
llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
llvm/utils/unittest/googlemock/include/gmock/internal/gmock-pp.h
llvm/utils/unittest/googlemock/src/gmock-all.cc
llvm/utils/unittest/googlemock/src/gmock-cardinalities.cc
llvm/utils/unittest/googlemock/src/gmock-internal-utils.cc
llvm/utils/unittest/googlemock/src/gmock-matchers.cc
llvm/utils/unittest/googlemock/src/gmock-spec-builders.cc
llvm/utils/unittest/googlemock/src/gmock.cc
llvm/utils/unittest/googletest/LICENSE.TXT
llvm/utils/unittest/googletest/README.LLVM
llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h
llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h
llvm/utils/unittest/googletest/include/gtest/gtest-message.h
llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h
llvm/utils/unittest/googletest/include/gtest/gtest-printers.h
llvm/utils/unittest/googletest/include/gtest/gtest-spi.h
llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h
llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h
llvm/utils/unittest/googletest/include/gtest/gtest.h
llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
llvm/utils/unittest/googletest/include/gtest/gtest_prod.h
llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h
llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest.h
llvm/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
llvm/utils/unittest/googletest/src/gtest-all.cc
llvm/utils/unittest/googletest/src/gtest-death-test.cc
llvm/utils/unittest/googletest/src/gtest-filepath.cc
llvm/utils/unittest/googletest/src/gtest-internal-inl.h
llvm/utils/unittest/googletest/src/gtest-matchers.cc
llvm/utils/unittest/googletest/src/gtest-port.cc
llvm/utils/unittest/googletest/src/gtest-printers.cc
llvm/utils/unittest/googletest/src/gtest-test-part.cc
llvm/utils/unittest/googletest/src/gtest-typed-test.cc
llvm/utils/unittest/googletest/src/gtest.cc
Modified:
clang/CMakeLists.txt
compiler-rt/CMakeLists.txt
lld/CMakeLists.txt
lldb/cmake/modules/LLDBStandalone.cmake
llvm/CMakeLists.txt
llvm/cmake/modules/HandleLLVMOptions.cmake
mlir/CMakeLists.txt
polly/CMakeLists.txt
Removed:
third-party/unittest/CMakeLists.txt
third-party/unittest/UnitTestMain/CMakeLists.txt
third-party/unittest/UnitTestMain/TestMain.cpp
third-party/unittest/googlemock/LICENSE.txt
third-party/unittest/googlemock/README.LLVM
third-party/unittest/googlemock/include/gmock/gmock-actions.h
third-party/unittest/googlemock/include/gmock/gmock-cardinalities.h
third-party/unittest/googlemock/include/gmock/gmock-function-mocker.h
third-party/unittest/googlemock/include/gmock/gmock-generated-actions.h
third-party/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
third-party/unittest/googlemock/include/gmock/gmock-generated-matchers.h
third-party/unittest/googlemock/include/gmock/gmock-matchers.h
third-party/unittest/googlemock/include/gmock/gmock-more-actions.h
third-party/unittest/googlemock/include/gmock/gmock-more-matchers.h
third-party/unittest/googlemock/include/gmock/gmock-nice-strict.h
third-party/unittest/googlemock/include/gmock/gmock-spec-builders.h
third-party/unittest/googlemock/include/gmock/gmock.h
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
third-party/unittest/googlemock/include/gmock/internal/gmock-port.h
third-party/unittest/googlemock/include/gmock/internal/gmock-pp.h
third-party/unittest/googlemock/src/gmock-all.cc
third-party/unittest/googlemock/src/gmock-cardinalities.cc
third-party/unittest/googlemock/src/gmock-internal-utils.cc
third-party/unittest/googlemock/src/gmock-matchers.cc
third-party/unittest/googlemock/src/gmock-spec-builders.cc
third-party/unittest/googlemock/src/gmock.cc
third-party/unittest/googletest/LICENSE.TXT
third-party/unittest/googletest/README.LLVM
third-party/unittest/googletest/include/gtest/gtest-death-test.h
third-party/unittest/googletest/include/gtest/gtest-matchers.h
third-party/unittest/googletest/include/gtest/gtest-message.h
third-party/unittest/googletest/include/gtest/gtest-param-test.h
third-party/unittest/googletest/include/gtest/gtest-printers.h
third-party/unittest/googletest/include/gtest/gtest-spi.h
third-party/unittest/googletest/include/gtest/gtest-test-part.h
third-party/unittest/googletest/include/gtest/gtest-typed-test.h
third-party/unittest/googletest/include/gtest/gtest.h
third-party/unittest/googletest/include/gtest/gtest_pred_impl.h
third-party/unittest/googletest/include/gtest/gtest_prod.h
third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h
third-party/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
third-party/unittest/googletest/include/gtest/internal/custom/gtest.h
third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
third-party/unittest/googletest/include/gtest/internal/gtest-filepath.h
third-party/unittest/googletest/include/gtest/internal/gtest-internal.h
third-party/unittest/googletest/include/gtest/internal/gtest-param-util.h
third-party/unittest/googletest/include/gtest/internal/gtest-port-arch.h
third-party/unittest/googletest/include/gtest/internal/gtest-port.h
third-party/unittest/googletest/include/gtest/internal/gtest-string.h
third-party/unittest/googletest/include/gtest/internal/gtest-type-util.h
third-party/unittest/googletest/src/gtest-all.cc
third-party/unittest/googletest/src/gtest-death-test.cc
third-party/unittest/googletest/src/gtest-filepath.cc
third-party/unittest/googletest/src/gtest-internal-inl.h
third-party/unittest/googletest/src/gtest-matchers.cc
third-party/unittest/googletest/src/gtest-port.cc
third-party/unittest/googletest/src/gtest-printers.cc
third-party/unittest/googletest/src/gtest-test-part.cc
third-party/unittest/googletest/src/gtest-typed-test.cc
third-party/unittest/googletest/src/gtest.cc
################################################################################
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index c9f86d4c9889c..8763cc0c1caa8 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -111,11 +111,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)
+ 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(${UNITTEST_DIR} utils/unittest)
endif()
endif()
@@ -526,7 +526,7 @@ endif()
if( CLANG_INCLUDE_TESTS )
- if(EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h)
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
add_subdirectory(unittests)
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
list(APPEND CLANG_TEST_PARAMS
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index e244a54179978..674c7e7652685 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -639,7 +639,7 @@ elseif (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libstdc++")
endif()
# Unittests support.
-set(COMPILER_RT_GTEST_PATH ${LLVM_THIRD_PARTY_DIR}/unittest/googletest)
+set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest)
set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc)
set(COMPILER_RT_GTEST_CFLAGS
-DGTEST_NO_LLVM_SUPPORT=1
@@ -649,7 +649,7 @@ set(COMPILER_RT_GTEST_CFLAGS
)
# Mocking support.
-set(COMPILER_RT_GMOCK_PATH ${LLVM_THIRD_PATY_DIR}/unittest/googlemock)
+set(COMPILER_RT_GMOCK_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock)
set(COMPILER_RT_GMOCK_SOURCE ${COMPILER_RT_GMOCK_PATH}/src/gmock-all.cc)
set(COMPILER_RT_GMOCK_CFLAGS
-DGTEST_NO_LLVM_SUPPORT=1
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 99f284e2e2266..21a33c9425a0d 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -68,11 +68,11 @@ if(LLD_BUILT_STANDALONE)
set(LLVM_UTILS_PROVIDED ON)
set(LLD_TEST_DEPS FileCheck not)
endif()
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
+ 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(${UNITTEST_DIR} utils/unittest)
endif()
else()
# Seek installed Lit.
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake
index ce16f558012c5..3ce63f12eef39 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/lldb/cmake/modules/LLDBStandalone.cmake
@@ -100,8 +100,8 @@ include_directories(
if(LLDB_INCLUDE_TESTS)
# Build the gtest library needed for unittests, if we have LLVM sources
# handy.
- if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest AND NOT TARGET llvm_gtest)
- add_subdirectory(${LLVM_THIRD_PARTY_DIR}}/utils/unittest third-party/unittest)
+ if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET llvm_gtest)
+ add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
endif()
# LLVMTestingSupport library is needed for Process/gdb-remote.
if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 60e1f29620af8..aafdbbe0ef298 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -401,6 +401,7 @@ set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix
+set(LLVM_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../third-party)
# Note: LLVM_CMAKE_DIR does not include generated files
set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules)
@@ -1193,7 +1194,7 @@ if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/yaml-bench)
add_subdirectory(utils/split-file)
if( LLVM_INCLUDE_TESTS )
- add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
+ add_subdirectory(utils/unittest)
endif()
else()
if ( LLVM_INCLUDE_TESTS )
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 7f141d93d4c2f..abf10df855047 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1260,6 +1260,3 @@ if(LLVM_USE_RELATIVE_PATHS_IN_FILES)
append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES)
endif()
-
-set(LLVM_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE STRING
- "Directory containing third party software used by LLVM (e.g. googletest)")
diff --git a/third-party/unittest/CMakeLists.txt b/llvm/utils/unittest/CMakeLists.txt
similarity index 100%
rename from third-party/unittest/CMakeLists.txt
rename to llvm/utils/unittest/CMakeLists.txt
diff --git a/third-party/unittest/UnitTestMain/CMakeLists.txt b/llvm/utils/unittest/UnitTestMain/CMakeLists.txt
similarity index 100%
rename from third-party/unittest/UnitTestMain/CMakeLists.txt
rename to llvm/utils/unittest/UnitTestMain/CMakeLists.txt
diff --git a/third-party/unittest/UnitTestMain/TestMain.cpp b/llvm/utils/unittest/UnitTestMain/TestMain.cpp
similarity index 100%
rename from third-party/unittest/UnitTestMain/TestMain.cpp
rename to llvm/utils/unittest/UnitTestMain/TestMain.cpp
diff --git a/third-party/unittest/googlemock/LICENSE.txt b/llvm/utils/unittest/googlemock/LICENSE.txt
similarity index 100%
rename from third-party/unittest/googlemock/LICENSE.txt
rename to llvm/utils/unittest/googlemock/LICENSE.txt
diff --git a/third-party/unittest/googlemock/README.LLVM b/llvm/utils/unittest/googlemock/README.LLVM
similarity index 100%
rename from third-party/unittest/googlemock/README.LLVM
rename to llvm/utils/unittest/googlemock/README.LLVM
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-actions.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-cardinalities.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-cardinalities.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-function-mocker.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-function-mocker.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-generated-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-generated-actions.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-generated-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-generated-matchers.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-matchers.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-more-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-more-actions.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-more-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-more-matchers.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-nice-strict.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-nice-strict.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock-spec-builders.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock-spec-builders.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h
diff --git a/third-party/unittest/googlemock/include/gmock/gmock.h b/llvm/utils/unittest/googlemock/include/gmock/gmock.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/gmock.h
rename to llvm/utils/unittest/googlemock/include/gmock/gmock.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/custom/gmock-port.h b/llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/gmock-port.h b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/gmock-port.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h
diff --git a/third-party/unittest/googlemock/include/gmock/internal/gmock-pp.h b/llvm/utils/unittest/googlemock/include/gmock/internal/gmock-pp.h
similarity index 100%
rename from third-party/unittest/googlemock/include/gmock/internal/gmock-pp.h
rename to llvm/utils/unittest/googlemock/include/gmock/internal/gmock-pp.h
diff --git a/third-party/unittest/googlemock/src/gmock-all.cc b/llvm/utils/unittest/googlemock/src/gmock-all.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock-all.cc
rename to llvm/utils/unittest/googlemock/src/gmock-all.cc
diff --git a/third-party/unittest/googlemock/src/gmock-cardinalities.cc b/llvm/utils/unittest/googlemock/src/gmock-cardinalities.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock-cardinalities.cc
rename to llvm/utils/unittest/googlemock/src/gmock-cardinalities.cc
diff --git a/third-party/unittest/googlemock/src/gmock-internal-utils.cc b/llvm/utils/unittest/googlemock/src/gmock-internal-utils.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock-internal-utils.cc
rename to llvm/utils/unittest/googlemock/src/gmock-internal-utils.cc
diff --git a/third-party/unittest/googlemock/src/gmock-matchers.cc b/llvm/utils/unittest/googlemock/src/gmock-matchers.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock-matchers.cc
rename to llvm/utils/unittest/googlemock/src/gmock-matchers.cc
diff --git a/third-party/unittest/googlemock/src/gmock-spec-builders.cc b/llvm/utils/unittest/googlemock/src/gmock-spec-builders.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock-spec-builders.cc
rename to llvm/utils/unittest/googlemock/src/gmock-spec-builders.cc
diff --git a/third-party/unittest/googlemock/src/gmock.cc b/llvm/utils/unittest/googlemock/src/gmock.cc
similarity index 100%
rename from third-party/unittest/googlemock/src/gmock.cc
rename to llvm/utils/unittest/googlemock/src/gmock.cc
diff --git a/third-party/unittest/googletest/LICENSE.TXT b/llvm/utils/unittest/googletest/LICENSE.TXT
similarity index 100%
rename from third-party/unittest/googletest/LICENSE.TXT
rename to llvm/utils/unittest/googletest/LICENSE.TXT
diff --git a/third-party/unittest/googletest/README.LLVM b/llvm/utils/unittest/googletest/README.LLVM
similarity index 100%
rename from third-party/unittest/googletest/README.LLVM
rename to llvm/utils/unittest/googletest/README.LLVM
diff --git a/third-party/unittest/googletest/include/gtest/gtest-death-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-death-test.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-matchers.h b/llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-matchers.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-message.h b/llvm/utils/unittest/googletest/include/gtest/gtest-message.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-message.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-message.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-param-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-param-test.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-printers.h b/llvm/utils/unittest/googletest/include/gtest/gtest-printers.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-printers.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-printers.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-spi.h b/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-spi.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-spi.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-test-part.h b/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-test-part.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest-typed-test.h b/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest-typed-test.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest.h b/llvm/utils/unittest/googletest/include/gtest/gtest.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest_pred_impl.h b/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest_pred_impl.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
diff --git a/third-party/unittest/googletest/include/gtest/gtest_prod.h b/llvm/utils/unittest/googletest/include/gtest/gtest_prod.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/gtest_prod.h
rename to llvm/utils/unittest/googletest/include/gtest/gtest_prod.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h b/llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/custom/gtest-printers.h b/llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/custom/gtest.h b/llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/custom/gtest.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h b/llvm/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-filepath.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-filepath.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-internal.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-param-util.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-param-util.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-port-arch.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-port-arch.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-port.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-port.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-string.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-string.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-type-util.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
similarity index 100%
rename from third-party/unittest/googletest/include/gtest/internal/gtest-type-util.h
rename to llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
diff --git a/third-party/unittest/googletest/src/gtest-all.cc b/llvm/utils/unittest/googletest/src/gtest-all.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-all.cc
rename to llvm/utils/unittest/googletest/src/gtest-all.cc
diff --git a/third-party/unittest/googletest/src/gtest-death-test.cc b/llvm/utils/unittest/googletest/src/gtest-death-test.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-death-test.cc
rename to llvm/utils/unittest/googletest/src/gtest-death-test.cc
diff --git a/third-party/unittest/googletest/src/gtest-filepath.cc b/llvm/utils/unittest/googletest/src/gtest-filepath.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-filepath.cc
rename to llvm/utils/unittest/googletest/src/gtest-filepath.cc
diff --git a/third-party/unittest/googletest/src/gtest-internal-inl.h b/llvm/utils/unittest/googletest/src/gtest-internal-inl.h
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-internal-inl.h
rename to llvm/utils/unittest/googletest/src/gtest-internal-inl.h
diff --git a/third-party/unittest/googletest/src/gtest-matchers.cc b/llvm/utils/unittest/googletest/src/gtest-matchers.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-matchers.cc
rename to llvm/utils/unittest/googletest/src/gtest-matchers.cc
diff --git a/third-party/unittest/googletest/src/gtest-port.cc b/llvm/utils/unittest/googletest/src/gtest-port.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-port.cc
rename to llvm/utils/unittest/googletest/src/gtest-port.cc
diff --git a/third-party/unittest/googletest/src/gtest-printers.cc b/llvm/utils/unittest/googletest/src/gtest-printers.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-printers.cc
rename to llvm/utils/unittest/googletest/src/gtest-printers.cc
diff --git a/third-party/unittest/googletest/src/gtest-test-part.cc b/llvm/utils/unittest/googletest/src/gtest-test-part.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-test-part.cc
rename to llvm/utils/unittest/googletest/src/gtest-test-part.cc
diff --git a/third-party/unittest/googletest/src/gtest-typed-test.cc b/llvm/utils/unittest/googletest/src/gtest-typed-test.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest-typed-test.cc
rename to llvm/utils/unittest/googletest/src/gtest-typed-test.cc
diff --git a/third-party/unittest/googletest/src/gtest.cc b/llvm/utils/unittest/googletest/src/gtest.cc
similarity index 100%
rename from third-party/unittest/googletest/src/gtest.cc
rename to llvm/utils/unittest/googletest/src/gtest.cc
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index 651ec1a8c979e..0d86a5d6027b4 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -25,9 +25,11 @@ if(MLIR_STANDALONE_BUILD)
include_directories(${LLVM_INCLUDE_DIRS})
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
+ set(LLVM_MAIN_SRC_DIR ${CMAKE_SOURCE_DIR}/../llvm CACHE PATH
+ "Path to LLVM source tree")
+ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
@@ -176,7 +178,7 @@ add_subdirectory(lib/CAPI)
if (MLIR_INCLUDE_TESTS)
add_definitions(-DMLIR_INCLUDE_TESTS)
add_custom_target(MLIRUnitTests)
- if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h)
+ if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
add_subdirectory(unittests)
else()
message(WARNING "gtest not found, unittests will not be available")
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index aa992decc4220..2e906fdd8fc73 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -28,10 +28,10 @@ if(POLLY_STANDALONE_BUILD)
# Enable unit tests if available.
set(POLLY_GTEST_AVAIL 0)
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
+ set(UNITTEST_DIR ${LLVM_SOURCE_ROOT}/utils/unittest)
if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
if (NOT TARGET gtest)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
+ add_subdirectory(${UNITTEST_DIR} utils/unittest)
endif()
set(POLLY_GTEST_AVAIL 1)
endif()
More information about the cfe-commits
mailing list