diff options
author | Brad King <brad.king@kitware.com> | 2023-11-14 17:45:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-14 19:50:08 (GMT) |
commit | 50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba (patch) | |
tree | d6a62f015df772ea882e77cffdcc4f6f37f8efc8 /Source/cmComputeLinkDepends.h | |
parent | 0e26bd334db07e481e5585f5121fb7e9718e9c47 (diff) | |
download | CMake-50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba.zip CMake-50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba.tar.gz CMake-50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba.tar.bz2 |
cmComputeLinkInformation: Track targets named by TARGET_OBJECTS sources
Since commit b6a5382217 (Ninja: depend on language module information
files directly, 2023-02-10, v3.27.0-rc1~502^2), the return value of
`cmCommonTargetGenerator::GetLinkedTargetDirectories` must account for
linked object libraries because they may provide modules (#25112).
These were added by commit b665966933 (cmComputeLinkInformation: track
OBJECT library dependencies, 2023-07-22, v3.27.1~5^2). However, targets
named by `$<TARGET_OBJECTS:...>` sources are also needed (#25365).
The latter were added by commit 22da18b995 (Fortran: Restore support for
TARGET_OBJECTS providing modules, 2023-10-27, v3.28.0-rc4~9^2) and
commit 035302b7e3 (cmComputeLinkDepends: also copy the target from
object link items, 2023-10-27, v3.28.0-rc4~9^2~2). However, their
approach added link entries not actually specified by projects. It also
incorrectly re-used `cmComputeLinkDepends::AddLinkObject` for object
library targets when it is meant for their individual object files.
These problems caused additional regressions (#25417). Revert the
implementation parts of those commits and leave behind an assertion and
comment to help avoid the mistake in the future. Instead, track targets
named by `$<TARGET_OBJECTS:...>` sources with a dedicated member.
Issue: #25112
Issue: #25365
Fixes: #25417
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
Diffstat (limited to 'Source/cmComputeLinkDepends.h')
-rw-r--r-- | Source/cmComputeLinkDepends.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 63c289c..22c4e2a 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -100,7 +100,6 @@ private: void AddLinkObject(cmLinkItem const& item); void AddVarLinkEntries(size_t depender_index, const char* value); void AddDirectLinkEntries(); - void AddTargetObjectEntries(); template <typename T> void AddLinkEntries(size_t depender_index, std::vector<T> const& libs); void AddLinkObjects(std::vector<cmLinkItem> const& objs); |