[LLVMdev] [PATCH] Prevent CMake from installing libgtest*.

Michał Górny mgorny at gentoo.org
Sun Dec 29 10:38:38 PST 2013


This library is intended to be used locally for tests and not installed
as a global system library. And even if it were, the install doesn't
belong to LLVM but to a dedicated gtest package.
---
 utils/unittest/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
index fd1a048..c11c110 100644
--- a/utils/unittest/CMakeLists.txt
+++ b/utils/unittest/CMakeLists.txt
@@ -38,6 +38,9 @@ if(MSVC AND MSVC_VERSION EQUAL 1700)
   add_definitions(-D_VARIADIC_MAX=10)
 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
   )
-- 
1.8.5.2




More information about the llvm-dev mailing list