Move googletest to the third-party directory
authorTom Stellard <tstellar@redhat.com>
Wed, 9 Nov 2022 16:51:34 +0000 (08:51 -0800)
committerTom Stellard <tstellar@redhat.com>
Wed, 9 Nov 2022 23:28:08 +0000 (15:28 -0800)
Rre-commit of 59052468c3e38cab15582cefbb5133fd4c2ffce5 with a typo
fix in compiler-rt/CMakeLists.txt

72 files changed:
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
third-party/unittest/CMakeLists.txt [moved from llvm/utils/unittest/CMakeLists.txt with 100% similarity]
third-party/unittest/UnitTestMain/CMakeLists.txt [moved from llvm/utils/unittest/UnitTestMain/CMakeLists.txt with 100% similarity]
third-party/unittest/UnitTestMain/TestMain.cpp [moved from llvm/utils/unittest/UnitTestMain/TestMain.cpp with 100% similarity]
third-party/unittest/googlemock/LICENSE.txt [moved from llvm/utils/unittest/googlemock/LICENSE.txt with 100% similarity]
third-party/unittest/googlemock/README.LLVM [moved from llvm/utils/unittest/googlemock/README.LLVM with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-actions.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-cardinalities.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-function-mocker.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-function-mocker.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-generated-actions.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-generated-matchers.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-matchers.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-more-actions.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-more-actions.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-more-matchers.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-nice-strict.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-nice-strict.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock-spec-builders.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/gmock.h [moved from llvm/utils/unittest/googlemock/include/gmock/gmock.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/custom/gmock-port.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/gmock-port.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/gmock-port.h with 100% similarity]
third-party/unittest/googlemock/include/gmock/internal/gmock-pp.h [moved from llvm/utils/unittest/googlemock/include/gmock/internal/gmock-pp.h with 100% similarity]
third-party/unittest/googlemock/src/gmock-all.cc [moved from llvm/utils/unittest/googlemock/src/gmock-all.cc with 100% similarity]
third-party/unittest/googlemock/src/gmock-cardinalities.cc [moved from llvm/utils/unittest/googlemock/src/gmock-cardinalities.cc with 100% similarity]
third-party/unittest/googlemock/src/gmock-internal-utils.cc [moved from llvm/utils/unittest/googlemock/src/gmock-internal-utils.cc with 100% similarity]
third-party/unittest/googlemock/src/gmock-matchers.cc [moved from llvm/utils/unittest/googlemock/src/gmock-matchers.cc with 100% similarity]
third-party/unittest/googlemock/src/gmock-spec-builders.cc [moved from llvm/utils/unittest/googlemock/src/gmock-spec-builders.cc with 100% similarity]
third-party/unittest/googlemock/src/gmock.cc [moved from llvm/utils/unittest/googlemock/src/gmock.cc with 100% similarity]
third-party/unittest/googletest/LICENSE.TXT [moved from llvm/utils/unittest/googletest/LICENSE.TXT with 100% similarity]
third-party/unittest/googletest/README.LLVM [moved from llvm/utils/unittest/googletest/README.LLVM with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-death-test.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-matchers.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-matchers.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-message.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-message.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-param-test.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-printers.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-printers.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-spi.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-spi.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-test-part.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest-typed-test.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest_pred_impl.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h with 100% similarity]
third-party/unittest/googletest/include/gtest/gtest_prod.h [moved from llvm/utils/unittest/googletest/include/gtest/gtest_prod.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/custom/gtest-port.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-port.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/custom/gtest-printers.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest-printers.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/custom/gtest.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/custom/gtest.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/custom/raw-ostream.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-filepath.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-internal.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-param-util.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-port-arch.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-port.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-string.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h with 100% similarity]
third-party/unittest/googletest/include/gtest/internal/gtest-type-util.h [moved from llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h with 100% similarity]
third-party/unittest/googletest/src/gtest-all.cc [moved from llvm/utils/unittest/googletest/src/gtest-all.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-death-test.cc [moved from llvm/utils/unittest/googletest/src/gtest-death-test.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-filepath.cc [moved from llvm/utils/unittest/googletest/src/gtest-filepath.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-internal-inl.h [moved from llvm/utils/unittest/googletest/src/gtest-internal-inl.h with 100% similarity]
third-party/unittest/googletest/src/gtest-matchers.cc [moved from llvm/utils/unittest/googletest/src/gtest-matchers.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-port.cc [moved from llvm/utils/unittest/googletest/src/gtest-port.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-printers.cc [moved from llvm/utils/unittest/googletest/src/gtest-printers.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-test-part.cc [moved from llvm/utils/unittest/googletest/src/gtest-test-part.cc with 100% similarity]
third-party/unittest/googletest/src/gtest-typed-test.cc [moved from llvm/utils/unittest/googletest/src/gtest-typed-test.cc with 100% similarity]
third-party/unittest/googletest/src/gtest.cc [moved from llvm/utils/unittest/googletest/src/gtest.cc with 100% similarity]

index 8763cc0..c9f86d4 100644 (file)
@@ -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_MAIN_SRC_DIR}/utils/unittest)
+      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} utils/unittest)
+        add_subdirectory(${UNITTEST_DIR} third-party/unittest)
       endif()
     endif()
 
@@ -526,7 +526,7 @@ endif()
 
 
 if( CLANG_INCLUDE_TESTS )
-  if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
+  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
index 674c7e7..c722d34 100644 (file)
@@ -639,7 +639,7 @@ elseif (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libstdc++")
 endif()
 
 # Unittests support.
-set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest)
+set(COMPILER_RT_GTEST_PATH ${LLVM_THIRD_PARTY_DIR}/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_MAIN_SRC_DIR}/utils/unittest/googlemock)
+set(COMPILER_RT_GMOCK_PATH ${LLVM_THIRD_PARTY_DIR}/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
index 21a33c9..99f284e 100644 (file)
@@ -68,11 +68,11 @@ if(LLD_BUILT_STANDALONE)
         set(LLVM_UTILS_PROVIDED ON)
         set(LLD_TEST_DEPS FileCheck not)
       endif()
-      set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+      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} utils/unittest)
+        add_subdirectory(${UNITTEST_DIR} third-party/unittest)
       endif()
     else()
       # Seek installed Lit.
index 3ce63f1..ce16f55 100644 (file)
@@ -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_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET llvm_gtest)
-    add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
+  if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest AND NOT TARGET llvm_gtest)
+    add_subdirectory(${LLVM_THIRD_PARTY_DIR}}/utils/unittest third-party/unittest)
   endif()
   # LLVMTestingSupport library is needed for Process/gdb-remote.
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
index aafdbbe..60e1f29 100644 (file)
@@ -401,7 +401,6 @@ 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)
@@ -1194,7 +1193,7 @@ if( LLVM_INCLUDE_UTILS )
   add_subdirectory(utils/yaml-bench)
   add_subdirectory(utils/split-file)
   if( LLVM_INCLUDE_TESTS )
-    add_subdirectory(utils/unittest)
+    add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
   endif()
 else()
   if ( LLVM_INCLUDE_TESTS )
index abf10df..7f141d9 100644 (file)
@@ -1260,3 +1260,6 @@ 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)")
index 0d86a5d..651ec1a 100644 (file)
@@ -25,11 +25,9 @@ if(MLIR_STANDALONE_BUILD)
 
   include_directories(${LLVM_INCLUDE_DIRS})
 
-  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)
+  set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
   if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
-    add_subdirectory(${UNITTEST_DIR} utils/unittest)
+    add_subdirectory(${UNITTEST_DIR} third-party/unittest)
   endif()
 
   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
@@ -178,7 +176,7 @@ add_subdirectory(lib/CAPI)
 if (MLIR_INCLUDE_TESTS)
   add_definitions(-DMLIR_INCLUDE_TESTS)
   add_custom_target(MLIRUnitTests)
-  if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
+  if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h)
     add_subdirectory(unittests)
   else()
     message(WARNING "gtest not found, unittests will not be available")
index 2e906fd..aa992de 100644 (file)
@@ -28,10 +28,10 @@ if(POLLY_STANDALONE_BUILD)
 
   # Enable unit tests if available.
   set(POLLY_GTEST_AVAIL 0)
-  set(UNITTEST_DIR ${LLVM_SOURCE_ROOT}/utils/unittest)
+  set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
   if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
     if (NOT TARGET gtest)
-      add_subdirectory(${UNITTEST_DIR} utils/unittest)
+      add_subdirectory(${UNITTEST_DIR} third-party/unittest)
     endif()
     set(POLLY_GTEST_AVAIL 1)
   endif()