diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-03-13 16:37:10 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-03-13 17:11:57 +0100 |
commit | dde05b4b91321c97463f42927986e9e8dcc8ce94 (patch) | |
tree | cf65b57d0c9cee0e595c93a5c1abdff039fbfa1a /third-party | |
parent | cbd86cf2e89e43261306d58f9354b2ed74028972 (diff) | |
download | llvm-dde05b4b91321c97463f42927986e9e8dcc8ce94.zip llvm-dde05b4b91321c97463f42927986e9e8dcc8ce94.tar.gz llvm-dde05b4b91321c97463f42927986e9e8dcc8ce94.tar.bz2 |
[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 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
Diffstat (limited to 'third-party')
-rw-r--r-- | third-party/unittest/UnitTestMain/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/third-party/unittest/UnitTestMain/CMakeLists.txt b/third-party/unittest/UnitTestMain/CMakeLists.txt index 7a3ac8a..729ea7e 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} ) |