[llvm] [cmake] Set EXCLUDE_FROM_ALL on gtest and TestingSupport
authorMichał Górny <mgorny@gentoo.org>
Sun, 30 Oct 2022 06:37:15 +0000 (07:37 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 31 Oct 2022 13:58:00 +0000 (14:58 +0100)
commit64959325eb470489ca5757b9bd6eef97b402a0da
tree72a5767b86bde3dbe156c56a0110f04b4381cf6b
parent417850fd0735ff1803d78e2d96cc317241f9aef5
[llvm] [cmake] Set EXCLUDE_FROM_ALL on gtest and TestingSupport

Exclude building googletest and LLVMTestingSupport libraries from
the `all` target.  If unittests are being built, these libraries will
be built as a dependency anyway.  If they are not being built, building
them makes little sense as they are not installed or used otherwise.

This will also make standalone builds of other projects easier, as it
makes it possible to include these directories without having to cover
them with additional conditions to prevent them from being built
unconditionally.

Differential Revision: https://reviews.llvm.org/D137035
llvm/lib/Testing/Support/CMakeLists.txt
llvm/utils/unittest/CMakeLists.txt