diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-10-30 07:37:15 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-11-24 17:52:22 +0100 |
commit | a6eb76f57c4aec624dad018a5cd776d2c19ae773 (patch) | |
tree | 665f1886bb1e61518029c5f87cf962989f25ff45 /third-party | |
parent | 194ab73a419c758b5b0e0c705d54071724479e7d (diff) | |
download | llvm-a6eb76f57c4aec624dad018a5cd776d2c19ae773.zip llvm-a6eb76f57c4aec624dad018a5cd776d2c19ae773.tar.gz llvm-a6eb76f57c4aec624dad018a5cd776d2c19ae773.tar.bz2 |
[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
Diffstat (limited to 'third-party')
-rw-r--r-- | third-party/unittest/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/third-party/unittest/CMakeLists.txt b/third-party/unittest/CMakeLists.txt index 0e54e0e..302e9e0 100644 --- a/third-party/unittest/CMakeLists.txt +++ b/third-party/unittest/CMakeLists.txt @@ -38,6 +38,10 @@ if (HAVE_LIBPTHREAD) list(APPEND LIBS pthread) endif() +# Do not build unittest libraries automatically, they will be pulled in +# by unittests if these are built. +set(EXCLUDE_FROM_ALL ON) + add_llvm_library(llvm_gtest googletest/src/gtest-all.cc googlemock/src/gmock-all.cc |