[llvm] Include utils/unittest before projects and runtimes

Include utils/unittest before projects and runtimes so that downstream
projects can check for the existence of the llvm_gtest target. This is
motivated by 9c6c4d675b which fixes the stand-alone build
configuration where LLVM_MAIN_SRC_DIR does not exist.

Differential revision: https://reviews.llvm.org/D124314
This commit is contained in:
Jonas Devlieghere 2022-08-15 09:42:41 -07:00
parent 91594b5b98
commit 350755d94d
No known key found for this signature in database
GPG Key ID: 49CC0BD90FDEED4D
1 changed files with 3 additions and 3 deletions

View File

@ -1147,6 +1147,9 @@ if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/UnicodeData)
add_subdirectory(utils/yaml-bench)
add_subdirectory(utils/split-file)
if( LLVM_INCLUDE_TESTS )
add_subdirectory(utils/unittest)
endif()
else()
if ( LLVM_INCLUDE_TESTS )
message(FATAL_ERROR "Including tests when not building utils will not work.
@ -1191,9 +1194,6 @@ if( LLVM_INCLUDE_TESTS )
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