Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dde05b4

Browse files
committed
[third-party] Respect LLVM_INSTALL_GTEST for llvm_gtest_main
Pass BUILDTREE_ONLY to llvm_gtest_main only if LLVM_INSTALL_GTEST is not set. This fixes 0807986. Otherwise, llvm_gtest_main cannot be used in LLVM_DISTRIBUTION_COMPONENTS, effectively making it impossible to install llvm_gtest correctly. Differential Revision: https://reviews.llvm.org/D145946
1 parent cbd86cf commit dde05b4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
set(BUILDTREE_ONLY BUILDTREE_ONLY)
2+
if (LLVM_INSTALL_GTEST)
3+
set(BUILDTREE_ONLY "")
4+
endif ()
5+
16
add_llvm_library(llvm_gtest_main
27
TestMain.cpp
38

@@ -7,6 +12,5 @@ add_llvm_library(llvm_gtest_main
712
LINK_COMPONENTS
813
Support # Depends on llvm::cl
914

10-
# This library is not meant to be in the install tree, only the build tree.
11-
BUILDTREE_ONLY
15+
${BUILDTREE_ONLY}
1216
)

0 commit comments

Comments
 (0)