mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06: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);
|
||||
std::sort(SortedTests.begin(), SortedTests.end(), comp);
|
||||
std::stable_sort(SortedTests.begin(), SortedTests.end(), comp);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user