Xcode: Fix target ordering operator to meet std::sort requirements

`std::sort` requires strict-weak ordering where `a == b` is false.

Backport commit 80d0770250 (Xcode: Fix target ordering operator to meet
std::sort requirements, 2024-10-10, v4.0.0-rc1~660^2~1) to CMake 3.31.
This commit is contained in:
Gusts Kaksis
2024-10-10 21:22:19 +03:00
committed by Brad King
parent aa942cd81f
commit 8b92847daf

View File

@@ -1365,6 +1365,9 @@ struct cmCompareTargets
{
std::string const& a = l->GetTarget()->GetName();
std::string const& b = r->GetTarget()->GetName();
if (a == b) {
return false;
}
if (a == "ALL_BUILD"_s) {
return true;
}