summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-12 15:01:39 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-12 15:01:39 (GMT)
commitfa9e93f7122143ee4dd58ff9437ab2f67c2be2fe (patch)
tree90bd36152fbfe8da35dd508071914b18fd8014b1 /Source/CTest
parent47e8ee71dd120a1c591218c229380b214fea1da2 (diff)
downloadCMake-fa9e93f7122143ee4dd58ff9437ab2f67c2be2fe.zip
CMake-fa9e93f7122143ee4dd58ff9437ab2f67c2be2fe.tar.gz
CMake-fa9e93f7122143ee4dd58ff9437ab2f67c2be2fe.tar.bz2
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx7
1 files 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;
}