[PATCH] D79241: [cmake] Ensure that LINK_LIBS are dependencies for object library targets
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 09:06:21 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8303b1f46af6: [cmake] Ensure that LINK_LIBS are dependencies for object library targets (authored by stephenneuendorffer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79241/new/
https://reviews.llvm.org/D79241
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -467,6 +467,16 @@
if(ARG_DEPENDS)
add_dependencies(${obj_name} ${ARG_DEPENDS})
endif()
+ # Treat link libraries like PUBLIC dependencies. LINK_LIBS might
+ # result in generating header files. Add a dependendency so that
+ # the generated header is created before this object library.
+ if(ARG_LINK_LIBS)
+ foreach(link_lib ${ARG_LINK_LIBS})
+ if(TARGET ${link_lib})
+ add_dependencies(${obj_name} ${link_lib})
+ endif()
+ endforeach()
+ endif()
endif()
if(ARG_SHARED AND ARG_STATIC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79241.261841.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200504/c093fc30/attachment.bin>
More information about the llvm-commits
mailing list