Author: cbieneman Date: Mon Dec 5 13:40:34 2016 New Revision: 288691 URL: http://llvm.org/viewvc/llvm-project?rev=288691&view=rev Log: [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. Modified: lldb/trunk/unittests/CMakeLists.txt Modified: lldb/trunk/unittests/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/CMakeLists.txt?rev=288691&r1=288690&r2=288691&view=diff ============================================================================== --- lldb/trunk/unittests/CMakeLists.txt (original) +++ lldb/trunk/unittests/CMakeLists.txt Mon Dec 5 13:40:34 2016 @@ -15,7 +15,7 @@ include(${LLDB_PROJECT_ROOT}/cmake/LLDBD 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() _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits