diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-03-15 05:55:43 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-03-15 05:55:43 +0000 |
commit | 6e31072e21c1044cbfa47867009e23e47455a783 (patch) | |
tree | bec8b79a4dcfea8ff5abeb789044528076c18ea5 | |
parent | fb1833efeb14574104101bf521e88e18a315a27e (diff) | |
download | bcm5719-llvm-6e31072e21c1044cbfa47867009e23e47455a783.tar.gz bcm5719-llvm-6e31072e21c1044cbfa47867009e23e47455a783.zip |
[test] Fix test dependencies when using installed tools
Use the LLVM_UTILS_PROVIDED variable to determine whether test tool
dependencies should be exposed for clang-tools-extra tests. If clang is
being built stand-alone and LLVM test tools (FileCheck, count and not)
are installed, the top-level CMakeLists.txt of clang sets this variable
to indicate that they will not be built as a part of this build,
and therefore no dependencies should be emitted for them. This fixes
the dependency errors when building clang stand-alone with tests
enabled.
Differential Revision: https://reviews.llvm.org/D29851
llvm-svn: 297806
-rw-r--r-- | clang-tools-extra/test/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt index a852ef60540..c26bd5c487f 100644 --- a/clang-tools-extra/test/CMakeLists.txt +++ b/clang-tools-extra/test/CMakeLists.txt @@ -31,9 +31,6 @@ if(CLANG_TOOLS_TEST_USE_VG) endif() set(CLANG_TOOLS_TEST_DEPS - # Base line deps. - FileCheck count not - # clang-tidy tests require it. clang-headers @@ -58,6 +55,13 @@ set(CLANG_TOOLS_TEST_DEPS ExtraToolsUnitTests ) +if(NOT LLVM_UTILS_PROVIDED) + list(APPEND CLANG_TOOLS_TEST_DEPS + # Base line deps. + FileCheck count not + ) +endif() + add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests" ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CLANG_TOOLS_TEST_DEPS} |