[llvm] 350755d - [llvm] Include utils/unittest before projects and runtimes
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 09:54:49 PDT 2022
Author: Jonas Devlieghere
Date: 2022-08-15T09:54:35-07:00
New Revision: 350755d94d6b865bd9968bd02713bd71eaedc598
URL: https://github.com/llvm/llvm-project/commit/350755d94d6b865bd9968bd02713bd71eaedc598
DIFF: https://github.com/llvm/llvm-project/commit/350755d94d6b865bd9968bd02713bd71eaedc598.diff
LOG: [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 9c6c4d675bd1 which fixes the stand-alone build
configuration where LLVM_MAIN_SRC_DIR does not exist.
Differential revision: https://reviews.llvm.org/D124314
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 5496b8a6f8b4..fa1351e425ef 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -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
More information about the llvm-commits
mailing list