[PATCH] D23812: cmake: Do not install libgtest

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 13:59:34 PDT 2016


mgorny created this revision.
mgorny added a reviewer: Bigcheese.
mgorny added a subscriber: llvm-commits.

libgtest is an internal test dependency, and should not be installed to
the live system as a part of LLVM. Installing it top-level is just
asking for trouble, especially that LLVM has no right to claim that
specific filename and any other package may decide to install file with
the same name.

Bug: http://llvm.org/bugs/show_bug.cgi?id=18341


https://reviews.llvm.org/D23812

Files:
  utils/unittest/CMakeLists.txt

Index: utils/unittest/CMakeLists.txt
===================================================================
--- utils/unittest/CMakeLists.txt
+++ utils/unittest/CMakeLists.txt
@@ -37,6 +37,9 @@
   list(APPEND LIBS pthread)
 endif()
 
+# Delay building until the tests pull it in, and avoid installing it
+set(EXCLUDE_FROM_ALL ON)
+
 add_llvm_library(gtest
   googletest/src/gtest-all.cc
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23812.69031.patch
Type: text/x-patch
Size: 386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/6ac07bea/attachment.bin>


More information about the llvm-commits mailing list