diff options
author | Brad King <brad.king@kitware.com> | 2023-03-27 13:51:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-27 13:51:59 (GMT) |
commit | 367aa65a9f874f87eea21ee1adce70d65007beb4 (patch) | |
tree | 80ef582c69f5351d3b157eb19f7807531d916639 /Source/cmCommonTargetGenerator.cxx | |
parent | d0ba94707025275579e41636e67052d287d275b2 (diff) | |
parent | 01d7860fdb078dae5198056930e8cfd2ce532d84 (diff) | |
download | CMake-367aa65a9f874f87eea21ee1adce70d65007beb4.zip CMake-367aa65a9f874f87eea21ee1adce70d65007beb4.tar.gz CMake-367aa65a9f874f87eea21ee1adce70d65007beb4.tar.bz2 |
Merge topic 'module-depends-static-lib-cycle'
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8363
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 5601bf2..f6fdd48 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -165,6 +165,7 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories( { std::vector<std::string> dirs; std::set<cmGeneratorTarget const*> emitted; + cmGlobalCommonGenerator* const gg = this->GlobalCommonGenerator; if (cmComputeLinkInformation* cli = this->GeneratorTarget->GetLinkInformation(config)) { cmComputeLinkInformation::ItemVector const& items = cli->GetItems(); @@ -172,6 +173,8 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories( cmGeneratorTarget const* linkee = item.Target; if (linkee && !linkee->IsImported() + // Skip targets that build after this one in a static lib cycle. + && gg->TargetOrderIndexLess(linkee, this->GeneratorTarget) // We can ignore the INTERFACE_LIBRARY items because // Target->GetLinkInformation already processed their // link interface and they don't have any output themselves. |