[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>
Sun, 6 Nov 2022 07:55:20 +0000 (08:55 +0100)
commitb6be37b0be5e1b524456c375700c76b7dae5171c
tree6516c19c92ea89a1f85a7c6d7f431d0c9f2fe5f6
parenta8d93783f37c042ace67069ae4ca6f8fd849c2d0
[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