[PATCH] D131861: [llvm] Include utils/unittest before projects and runtimes

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 09:36:08 PDT 2022


JDevlieghere created this revision.
JDevlieghere added reviewers: mgorny, tstellar.
Herald added a project: All.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.

Include `utils/unittest` before projects and runtimes so that downstream projects can check for the existence of the `llvm_gtest` target.

Motivated by https://reviews.llvm.org/D124314


https://reviews.llvm.org/D131861

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -1141,6 +1141,9 @@
   add_subdirectory(utils/UnicodeData)
   add_subdirectory(utils/yaml-bench)
   add_subdirectory(utils/split-file)
+  if( LLVM_INCLUDE_UTILS )
+    add_subdirectory(utils/unittest)
+  endif()
 else()
   if ( LLVM_INCLUDE_TESTS )
     message(FATAL_ERROR "Including tests when not building utils will not work.
@@ -1185,9 +1188,6 @@
   add_subdirectory(utils/lit)
   add_subdirectory(test)
   add_subdirectory(unittests)
-  if( LLVM_INCLUDE_UTILS )
-    add_subdirectory(utils/unittest)
-  endif()
 
   if (WIN32)
     # This utility is used to prevent crashing tests from calling Dr. Watson on


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131861.452532.patch
Type: text/x-patch
Size: 759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220814/28354141/attachment.bin>


More information about the llvm-commits mailing list