diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e691b1eeb5..536a0cb100 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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; }