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.
This commit is contained in:
Brad King 2009-02-12 10:01:39 -05:00
parent 47e8ee71dd
commit fa9e93f712
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}