summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-06-02 16:35:24 +0000
committerPavel Labath <labath@google.com>2016-06-02 16:35:24 +0000
commit8b8f7531fb5d2dffad9d8534b0548f22cf0b3917 (patch)
tree6f01944a1a85773d44b7e0f70af5aece32e3147c /test/CMakeLists.txt
parentdd6398fcb874fb710c9a4036cd52b7ec4f508e4a (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ca8c984f7d..4a0f677726 100644
--- a/test/CMakeLists.txt
+++ b/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})