mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 21:58:50 -05:00
Use stable_sort to preserve test order (#11877)
Using sort results in a possibly-modified sorting when all elements are "tied" - use stable_sort instead to preserve the original ordering of tied elements.
This commit is contained in:
@@ -484,7 +484,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
TestComparator comp(this);
|
TestComparator comp(this);
|
||||||
std::sort(SortedTests.begin(), SortedTests.end(), comp);
|
std::stable_sort(SortedTests.begin(), SortedTests.end(), comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user