[PATCH] D131919: Move googletest to the third-party directory

2022-11-09 Thread Tom Stellard via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG59052468c3e3: Move googletest to the third-party directory 
(authored by tstellar).

Changed prior to commit:
  https://reviews.llvm.org/D131919?vs=468784=474310#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/cmake/modules/LLDBStandalone.cmake
  llvm/CMakeLists.txt
  llvm/cmake/modules/HandleLLVMOptions.cmake
  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
  mlir/CMakeLists.txt
  polly/CMakeLists.txt
  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
  

[PATCH] D131919: Move googletest to the third-party directory

2022-11-03 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision.
probinson added a comment.

Yes, LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-11-03 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment.
Herald added a subscriber: Moerafaat.

@probinson Does this latest update look better?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-10-18 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 468784.
tstellar marked 4 inline comments as done.
tstellar added a comment.
Herald added a subscriber: zero9178.

Rebase and fix some missed path updates.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/cmake/modules/LLDBStandalone.cmake
  llvm/CMakeLists.txt
  llvm/cmake/modules/HandleLLVMOptions.cmake
  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
  mlir/CMakeLists.txt
  polly/CMakeLists.txt
  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

[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment.

In D131919#3749850 , @Meinersbur 
wrote:

> Semi-OT: `polly\lib\External` has 3 more third-party libraries. Two of them 
> have been heavily modified in-tree, the third has just a custom 
> CMakeLists.txt.
> Should these eventually also be moved?

I don't know that there's a formal policy.  Our copy of googletest is used by 
several projects, so unhooking it from the llvm tree has value in that regard.
Heavy modification might not be a blocker; googletest is somewhat 
stripped-down, although otherwise I think only lightly modified.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment.

Semi-OT: `polly\lib\External` has 3 more third-party libraries. Two of them 
have been heavily modified in-tree, the third has just a custom CMakeLists.txt.
Should these eventually also be moved?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments.



Comment at: clang/CMakeLists.txt:106
   AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
 add_subdirectory(${UNITTEST_DIR} utils/unittest)
   endif()

Should this be `third-party/unittest` ? Looking at how the lldb cmake files 
were modified.



Comment at: lld/CMakeLists.txt:69
   AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
 add_subdirectory(${UNITTEST_DIR} utils/unittest)
   endif()

See comment for clang/CMakeLists.txt



Comment at: mlir/CMakeLists.txt:25
   if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
 add_subdirectory(${UNITTEST_DIR} utils/unittest)
   endif()

See comment for clang/CMakeLists.txt



Comment at: polly/CMakeLists.txt:37
 if (NOT TARGET gtest)
   add_subdirectory(${UNITTEST_DIR} utils/unittest)
 endif()

See comment for clang/CMakeLists.txt


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-16 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 453194.
tstellar added a comment.

Rebase.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/cmake/modules/LLDBStandalone.cmake
  llvm/CMakeLists.txt
  llvm/cmake/modules/HandleLLVMOptions.cmake
  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
  mlir/CMakeLists.txt
  polly/CMakeLists.txt
  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
  

[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Stella Laurenzo via Phabricator via cfe-commits
stellaraccident accepted this revision.
stellaraccident added inline comments.



Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:1257
+
+set(LLVM_THIRD_PARTY_DIR  ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE 
STRING
+"Directory containing third party software used by LLVM (e.g. googletest)")

tstellar wrote:
> stellaraccident wrote:
> > Is the implication that this file should only ever be included by top-level 
> > sub-projects (i.e. clang, mlir, llvm, etc)? If included from elsewhere, it 
> > seems like it won't do the right thing.
> > 
> > Also, having this as a cache entry is going to make it harder for out of 
> > tree projects to define it reliably (requiring various FORCE heroics) -- 
> > but I know why you are doing it if trying to define it here.
> > 
> > As is, this file is included from most of the top-levels and making it a 
> > cache variable will have them racing to set it. Why not make it a regular 
> > variable? And why not derive it from LLVM_MAIN_SRC_DIR?
> I put it in this file so that this variable would be available for 
> stand-alone builds and made it a cache variable so it could be overridden by 
> standalone builds too.
> 
> The alternative would be to define this variable in llvm/CMakeLists.txt and 
> then in the stand-alone build handling for each sub-project.  It's a lot of 
> code duplication that way, but we already have a lot of similar duplication 
> in the CMakeLists.txt today (this is something I would like to clean up in 
> the future).
> 
> Using LLVM_MAIN_SRC_DIR here breaks stand-alone builds, because 
> LLVM_MAIN_SRC_DIR expands to ../llvm/../, so if I try to build lld, with a 
> directory layout of:
> 
> ```
> lld/ cmake/ third-party/
> ```
> 
> Then CMake won't be able to find the third-party/ directory even though it is 
> in the right place (because llvm/ is missing).  I also think in general, it's 
> cleaner to only use LLVM_MAIN_SRC_DIR when we want to use files in llvm/ and 
> not for finding the root of the monorepo.
Thanks - I think I understand why you are doing it this way. I'm just trying to 
think of a way that has fewer thorns... And not being successful (without major 
surgery on the way this cmake setup is layered). I'm fine with how you have it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments.



Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:1257
+
+set(LLVM_THIRD_PARTY_DIR  ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE 
STRING
+"Directory containing third party software used by LLVM (e.g. googletest)")

stellaraccident wrote:
> Is the implication that this file should only ever be included by top-level 
> sub-projects (i.e. clang, mlir, llvm, etc)? If included from elsewhere, it 
> seems like it won't do the right thing.
> 
> Also, having this as a cache entry is going to make it harder for out of tree 
> projects to define it reliably (requiring various FORCE heroics) -- but I 
> know why you are doing it if trying to define it here.
> 
> As is, this file is included from most of the top-levels and making it a 
> cache variable will have them racing to set it. Why not make it a regular 
> variable? And why not derive it from LLVM_MAIN_SRC_DIR?
I put it in this file so that this variable would be available for stand-alone 
builds and made it a cache variable so it could be overridden by standalone 
builds too.

The alternative would be to define this variable in llvm/CMakeLists.txt and 
then in the stand-alone build handling for each sub-project.  It's a lot of 
code duplication that way, but we already have a lot of similar duplication in 
the CMakeLists.txt today (this is something I would like to clean up in the 
future).

Using LLVM_MAIN_SRC_DIR here breaks stand-alone builds, because 
LLVM_MAIN_SRC_DIR expands to ../llvm/../, so if I try to build lld, with a 
directory layout of:

```
lld/ cmake/ third-party/
```

Then CMake won't be able to find the third-party/ directory even though it is 
in the right place (because llvm/ is missing).  I also think in general, it's 
cleaner to only use LLVM_MAIN_SRC_DIR when we want to use files in llvm/ and 
not for finding the root of the monorepo.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Stella Laurenzo via Phabricator via cfe-commits
stellaraccident added inline comments.



Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:1257
+
+set(LLVM_THIRD_PARTY_DIR  ${CMAKE_CURRENT_SOURCE_DIR}/../third-party CACHE 
STRING
+"Directory containing third party software used by LLVM (e.g. googletest)")

Is the implication that this file should only ever be included by top-level 
sub-projects (i.e. clang, mlir, llvm, etc)? If included from elsewhere, it 
seems like it won't do the right thing.

Also, having this as a cache entry is going to make it harder for out of tree 
projects to define it reliably (requiring various FORCE heroics) -- but I know 
why you are doing it if trying to define it here.

As is, this file is included from most of the top-levels and making it a cache 
variable will have them racing to set it. Why not make it a regular variable? 
And why not derive it from LLVM_MAIN_SRC_DIR?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision.
phosek added a comment.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.

I didn't review the patch in detail, but +1 this is a great step forward to 
reorganize the repo!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131919/new/

https://reviews.llvm.org/D131919

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D131919: Move googletest to the third-party directory

2022-08-15 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision.
tstellar added reviewers: stellaraccident, rnk, lattner, probinson, jyknight, 
phosek.
Herald added subscribers: Enna1, bzcheeseman, sdasgup3, wenzhicui, wrengr, 
mstorsjo, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, 
grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, 
shauheen, rriddle, mehdi_amini, mgrang, fedor.sergeev, krytarowski, mgorny, 
dschuff.
Herald added a reviewer: bollu.
Herald added a project: All.
tstellar requested review of this revision.
Herald added subscribers: lldb-commits, Sanitizers, cfe-commits, 
stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, MLIR, LLVM.

This will help improve the project's layering, so that sub-projects
that don't actually need any llvm code can still use googletest
without having to reference code in the llvm directory.

This will also make it easier to consolidate and simplify the standalone
build configurations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131919

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/cmake/modules/LLDBStandalone.cmake
  llvm/CMakeLists.txt
  llvm/cmake/modules/HandleLLVMOptions.cmake
  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