[CMake] Don't add gtest if it is already there
LLVM build trees export the gtest library through a special export set. If you're building against a build tree you shouldn't need to re-add gtest, but if you're building against an installed LLVM you do. llvm-svn: 288691
This commit is contained in:
parent
fc6100c195
commit
07522bb187
|
@ -15,7 +15,7 @@ include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
|||
if (LLDB_BUILT_STANDALONE)
|
||||
# Build the gtest library needed for unittests, if we have LLVM sources
|
||||
# handy.
|
||||
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest)
|
||||
if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest AND NOT TARGET gtest)
|
||||
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/unittest utils/unittest)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue