summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-02-18 18:10:26 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-02-18 18:10:26 (GMT)
commit8af8eab7a43aa80ba89d082e23928e19265be885 (patch)
treea9e57258ccd4c38cf78fe4453ca8a76375dda654 /Source/CTest
parent16b99e6caec41aaa4366b5f49e2d3b2de1225001 (diff)
downloadCMake-8af8eab7a43aa80ba89d082e23928e19265be885.zip
CMake-8af8eab7a43aa80ba89d082e23928e19265be885.tar.gz
CMake-8af8eab7a43aa80ba89d082e23928e19265be885.tar.bz2
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index f3a4457..2cae802 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -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);
}
//---------------------------------------------------------