https://github.com/Kitware/CMake
Revision 50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba authored by Brad King on 14 November 2023, 17:45:06 UTC, committed by Brad King on 14 November 2023, 19:50:08 UTC
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>
1 parent 0e26bd3
History
Tip revision: 50fdaf8f1f6e34d9362b679df0a26d6bbf77c0ba authored by Brad King on 14 November 2023, 17:45:06 UTC
cmComputeLinkInformation: Track targets named by TARGET_OBJECTS sources
Tip revision: 50fdaf8
File Mode Size
.github
.gitlab
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 1.4 KB
.clang-tidy -rw-r--r-- 1.8 KB
.codespellrc -rw-r--r-- 644 bytes
.editorconfig -rw-r--r-- 164 bytes
.gitattributes -rw-r--r-- 1.2 KB
.gitignore -rw-r--r-- 422 bytes
.gitlab-ci.yml -rw-r--r-- 34.5 KB
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.9 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.0 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 21.0 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.0 KB
CTestConfig.cmake -rw-r--r-- 566 bytes
CTestCustom.cmake.in -rw-r--r-- 7.3 KB
CompileFlags.cmake -rw-r--r-- 5.0 KB
Copyright.txt -rw-r--r-- 5.3 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.9 KB
bootstrap -rwxr-xr-x 64.6 KB
cmake_uninstall.cmake.in -rw-r--r-- 789 bytes
configure -rwxr-xr-x 99 bytes

README.rst

back to top