summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--third-party/unittest/UnitTestMain/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/third-party/unittest/UnitTestMain/CMakeLists.txt b/third-party/unittest/UnitTestMain/CMakeLists.txt
index 7a3ac8a0f43e..729ea7e3fa7e 100644
--- a/third-party/unittest/UnitTestMain/CMakeLists.txt
+++ b/third-party/unittest/UnitTestMain/CMakeLists.txt
@@ -1,3 +1,8 @@
+set(BUILDTREE_ONLY BUILDTREE_ONLY)
+if (LLVM_INSTALL_GTEST)
+ set(BUILDTREE_ONLY "")
+endif ()
+
add_llvm_library(llvm_gtest_main
TestMain.cpp
@@ -7,6 +12,5 @@ add_llvm_library(llvm_gtest_main
LINK_COMPONENTS
Support # Depends on llvm::cl
- # This library is not meant to be in the install tree, only the build tree.
- BUILDTREE_ONLY
+ ${BUILDTREE_ONLY}
)