summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItem.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-26 14:56:10 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-29 13:28:36 (GMT)
commit3941555d935afad8343c66f39579bfc611201a6f (patch)
tree4f5b55b32aa25a56fb6f6f10ba896585878e6331 /Source/cmLinkItem.h
parentf530b3a26729d0820c804e312b72e0061d6eeb4b (diff)
downloadCMake-3941555d935afad8343c66f39579bfc611201a6f.zip
CMake-3941555d935afad8343c66f39579bfc611201a6f.tar.gz
CMake-3941555d935afad8343c66f39579bfc611201a6f.tar.bz2
target_link_libraries: Place $<TARGET_OBJECTS> before libraries
Linkers always use object files explicitly specified on the command line regardless of where they appear. Move them to the front of the list of linked libraries in so that symbols required by the object files can be resolved by any library. Issue: #22149
Diffstat (limited to 'Source/cmLinkItem.h')
-rw-r--r--Source/cmLinkItem.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index 5a90e7e..db44938 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -50,6 +50,9 @@ struct cmLinkImplementationLibraries
// Libraries linked directly in this configuration.
std::vector<cmLinkImplItem> Libraries;
+ // Object files linked directly in this configuration.
+ std::vector<cmLinkItem> Objects;
+
// Libraries linked directly in other configurations.
// Needed only for OLD behavior of CMP0003.
std::vector<cmLinkItem> WrongConfigLibraries;
@@ -63,6 +66,9 @@ struct cmLinkInterfaceLibraries
// Libraries listed in the interface.
std::vector<cmLinkItem> Libraries;
+ // Object files listed in the interface.
+ std::vector<cmLinkItem> Objects;
+
// Whether the list depends on a genex referencing the head target.
bool HadHeadSensitiveCondition = false;