diff options
author | Brad King <brad.king@kitware.com> | 2023-07-24 12:31:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-07-24 12:31:52 (GMT) |
commit | 21721ad3cea539a0157f77e19add5aa873290fa3 (patch) | |
tree | 3a006a29d8ced92cf5662cb7a9216c0f0cb8d8e7 /Source/cmCommonTargetGenerator.cxx | |
parent | 3ea7204de47d78b1aa8ee3cddfa59d034fc601d8 (diff) | |
parent | b665966933c8656d1dafde06b8f29fe7e4901738 (diff) | |
download | CMake-21721ad3cea539a0157f77e19add5aa873290fa3.zip CMake-21721ad3cea539a0157f77e19add5aa873290fa3.tar.gz CMake-21721ad3cea539a0157f77e19add5aa873290fa3.tar.bz2 |
Merge topic 'dyndep-module-info-objlib-dependency' into release-3.27
b665966933 cmComputeLinkInformation: track OBJECT library dependencies
a99b87a628 Tests/RunCMake/CXXModules: add a test for issue #25112
2870a67540 Tests/FortranOnly: add a test case for issue #25112
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8645
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index e635dd9..1924235 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -170,9 +170,15 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories( cmGlobalCommonGenerator* const gg = this->GlobalCommonGenerator; if (cmComputeLinkInformation* cli = this->GeneratorTarget->GetLinkInformation(config)) { - cmComputeLinkInformation::ItemVector const& items = cli->GetItems(); - for (auto const& item : items) { - cmGeneratorTarget const* linkee = item.Target; + std::vector<cmGeneratorTarget const*> targets; + for (auto const& item : cli->GetItems()) { + targets.push_back(item.Target); + } + for (auto const* target : cli->GetObjectLibrariesLinked()) { + targets.push_back(target); + } + + for (auto const* linkee : targets) { if (linkee && !linkee->IsImported() // Skip targets that build after this one in a static lib cycle. |