diff options
author | Pavel Labath <labath@google.com> | 2016-06-02 16:35:24 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-06-02 16:35:24 +0000 |
commit | 42f978065b4f09b3fa561f59058e8fe0fdf32bff (patch) | |
tree | 3859cf629e45568f1d637b233a489259d8ff19d5 | |
parent | 7008ce3f989105a667eab5f34f7ba6fcdc1ba3d8 (diff) | |
download | bcm5719-llvm-42f978065b4f09b3fa561f59058e8fe0fdf32bff.tar.gz bcm5719-llvm-42f978065b4f09b3fa561f59058e8fe0fdf32bff.zip |
[cmake] Fix builds with LLVM_ENABLE_PIC=0
Summary:
When this flag is specified, the target llvm-lto is not built, but is still
used as a dependency of the test targets. cmake 2.8 silently ignored this
situation, but with cmake_minimum_required(3.4) it becomes an error. Fix this
by avoiding the inclusion the target as a dependency.
Reviewers: beanz
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D20883
llvm-svn: 271533
-rw-r--r-- | clang/test/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index ca8c984f7d8..4a0f6777263 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -68,14 +68,20 @@ if( NOT CLANG_BUILT_STANDALONE ) FileCheck count not llc llvm-bcanalyzer - llvm-lto llvm-objdump llvm-profdata llvm-readobj llvm-symbolizer - LTO opt ) + + if(TARGET llvm-lto) + set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto) + endif() + + if(TARGET LTO) + set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO) + endif() endif() add_custom_target(clang-test-depends DEPENDS ${CLANG_TEST_DEPS}) |