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

Sean Silva chisophugis at gmail.com
Sun Dec 29 11:42:49 PST 2013


Patches should be sent to llvm-commits, and they should be attached rather
than inline. <http://llvm.org/docs/DeveloperPolicy.html>

-- Sean Silva


On Sun, Dec 29, 2013 at 11:38 AM, Michał Górny <mgorny at gentoo.org> wrote:

> 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
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131229/185ab33a/attachment.html>


More information about the llvm-dev mailing list