mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 10:06:36 +00:00

Pass BUILDTREE_ONLY to llvm_gtest_main only if LLVM_INSTALL_GTEST is not set. This fixes 0807986303f5d498cee32d42c242940d00617ad9. 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
17 lines
244 B
CMake
17 lines
244 B
CMake
set(BUILDTREE_ONLY BUILDTREE_ONLY)
|
|
if (LLVM_INSTALL_GTEST)
|
|
set(BUILDTREE_ONLY "")
|
|
endif ()
|
|
|
|
add_llvm_library(llvm_gtest_main
|
|
TestMain.cpp
|
|
|
|
LINK_LIBS
|
|
llvm_gtest
|
|
|
|
LINK_COMPONENTS
|
|
Support # Depends on llvm::cl
|
|
|
|
${BUILDTREE_ONLY}
|
|
)
|