From fa9e93f7122143ee4dd58ff9437ab2f67c2be2fe Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 12 Feb 2009 10:01:39 -0500 Subject: BUG: Do not drop build fragments with same time When we collect Build.xml fragments generated by 'ctest --launch', this lexicographically orders fragments with the same time stamp on disk instead of incorrectly dropping duplicates. --- Source/CTest/cmCTestBuildHandler.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index c8e2185..a576960 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -535,10 +535,11 @@ public: FragmentCompare(cmFileTimeComparison* ftc): FTC(ftc) {} bool operator()(std::string const& l, std::string const& r) { - // Order files by modification time. If comparison fails, just - // use lexicographic order (should not happen in our use case). + // Order files by modification time. Use lexicographic order + // among files with the same time. int result; - if(this->FTC->FileTimeCompare(l.c_str(), r.c_str(), &result)) + if(this->FTC->FileTimeCompare(l.c_str(), r.c_str(), &result) && + result != 0) { return result < 0; } -- cgit v0.12