[PATCH] D77106: [cmake] Only set deps for an ExternalProject if the type is executable or library
Nathan Lanza via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 11:49:16 PDT 2020
lanza updated this revision to Diff 254263.
lanza marked 4 inline comments as done.
lanza added a comment.
update
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77106/new/
https://reviews.llvm.org/D77106
Files:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -62,7 +62,16 @@
foreach(tool ${ARG_TOOLCHAIN_TOOLS})
if(TARGET ${tool})
list(APPEND TOOLCHAIN_TOOLS ${tool})
- list(APPEND TOOLCHAIN_BINS $<TARGET_FILE:${tool}>)
+
+ # $<TARGET_FILE:tgt> only works on add_executable or add_library targets
+ get_target_property(target_type "${tool}" TYPE)
+ if(NOT target_type STREQUAL "OBJECT_LIBRARY" AND
+ NOT target_type STREQUAL "UTILITY" AND
+ NOT target_type STREQUAL "GLOBAL_TARGET" AND
+ NOT target_type STREQUAL "INTERFACE_LIBRARY")
+ list(APPEND TOOLCHAIN_BINS $<TARGET_FILE:${tool}>)
+ endif()
+
endif()
endforeach()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77106.254263.patch
Type: text/x-patch
Size: 879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/d4a07ed0/attachment.bin>
More information about the llvm-commits
mailing list