summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-27 13:51:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-27 13:51:59 (GMT)
commit367aa65a9f874f87eea21ee1adce70d65007beb4 (patch)
tree80ef582c69f5351d3b157eb19f7807531d916639 /Source/cmGlobalGenerator.cxx
parentd0ba94707025275579e41636e67052d287d275b2 (diff)
parent01d7860fdb078dae5198056930e8cfd2ce532d84 (diff)
downloadCMake-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/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7ed68d6..0e9f78e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1727,8 +1727,7 @@ cmGlobalGenerator::GetLocalGeneratorTargetsInOrder(cmLocalGenerator* lg) const
cm::append(gts, lg->GetGeneratorTargets());
std::sort(gts.begin(), gts.end(),
[this](cmGeneratorTarget const* l, cmGeneratorTarget const* r) {
- return this->TargetOrderIndex.at(l) <
- this->TargetOrderIndex.at(r);
+ return this->TargetOrderIndexLess(l, r);
});
return gts;
}
@@ -3068,6 +3067,12 @@ cmGlobalGenerator::GetTargetDirectDepends(cmGeneratorTarget const* target)
return this->TargetDependencies[target];
}
+bool cmGlobalGenerator::TargetOrderIndexLess(cmGeneratorTarget const* l,
+ cmGeneratorTarget const* r) const
+{
+ return this->TargetOrderIndex.at(l) < this->TargetOrderIndex.at(r);
+}
+
bool cmGlobalGenerator::IsReservedTarget(std::string const& name)
{
// The following is a list of targets reserved