[PATCH] D108098: [cmake] Properly support target properties.
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 14:08:37 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf7818093677: [cmake] Properly support target properties. (authored by stephenneuendorffer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108098/new/
https://reviews.llvm.org/D108098
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -486,6 +486,9 @@
# Do add_dependencies(obj) later due to CMake issue 14747.
list(APPEND objlibs ${obj_name})
+ # Bring in the target include directories from our original target.
+ target_include_directories(${obj_name} PRIVATE $<TARGET_PROPERTY:${name},INCLUDE_DIRECTORIES>)
+
set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
if(ARG_DEPENDS)
add_dependencies(${obj_name} ${ARG_DEPENDS})
@@ -525,6 +528,11 @@
LINK_LIBS ${ARG_LINK_LIBS}
LINK_COMPONENTS ${ARG_LINK_COMPONENTS}
)
+
+ # Bring in the target link info from our original target.
+ target_link_directories(${name_static} PRIVATE $<TARGET_PROPERTY:${name},LINK_DIRECTORIES>)
+ target_link_libraries(${name_static} PRIVATE $<TARGET_PROPERTY:${name},LINK_LIBRARIES>)
+
# FIXME: Add name_static to anywhere in TARGET ${name}'s PROPERTY.
set(ARG_STATIC)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108098.367005.patch
Type: text/x-patch
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/34e2aae7/attachment.bin>
More information about the llvm-commits
mailing list