summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-24 19:14:46 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-24 19:57:52 (GMT)
commit846baa7c5bdb3a93a816dfaa2a9e37282fd38d48 (patch)
tree84ca6961ccd5b5b7935b138e07ebf5904c7d4de0 /Source/cmGlobalGenerator.cxx
parentfae6e8c2cdb5ce6049439f4defd1367b507d1e4b (diff)
downloadCMake-846baa7c5bdb3a93a816dfaa2a9e37282fd38d48.zip
CMake-846baa7c5bdb3a93a816dfaa2a9e37282fd38d48.tar.gz
CMake-846baa7c5bdb3a93a816dfaa2a9e37282fd38d48.tar.bz2
cmGlobalGenerator: Factor out helper to check target ordering
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 4cfec22..b55fcb8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1719,8 +1719,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;
}
@@ -3060,6 +3059,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