[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>
Thu, 24 Nov 2022 16:52:22 +0000 (17:52 +0100)
commita6eb76f57c4aec624dad018a5cd776d2c19ae773
tree665f1886bb1e61518029c5f87cf962989f25ff45
parent194ab73a419c758b5b0e0c705d54071724479e7d
[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
third-party/unittest/CMakeLists.txt