[PATCH] D20882: [cmake] Fix builds with LLVM_ENABLE_PIC=0
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 15:33:54 PDT 2016
labath created this revision.
labath added a reviewer: beanz.
labath added a subscriber: llvm-commits.
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 of the target as a dependency.
http://reviews.llvm.org/D20882
Files:
test/CMakeLists.txt
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -43,7 +43,6 @@
llvm-extract
llvm-lib
llvm-link
- llvm-lto
llvm-mc
llvm-mcmarkup
llvm-nm
@@ -67,6 +66,10 @@
yaml2obj
)
+if(TARGET llvm-lto)
+ set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-lto)
+endif()
+
# If Intel JIT events are supported, depend on a tool that tests the listener.
if( LLVM_USE_INTEL_JITEVENTS )
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-jitlistener)
@@ -80,7 +83,7 @@
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
endif()
-if(APPLE)
+if(TARGET LTO)
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} LTO)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20882.59292.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160601/a09742ef/attachment-0001.bin>
More information about the llvm-commits
mailing list