Makefiles: Remove duplicate code.
The cmGlobalUnixMakefileGenerator3::ProgressMapCompare struct is logically equivalent to cmStrictTargetComparison.
This commit is contained in:
parent
2e0611f981
commit
c3a2f78b5a
|
@ -957,21 +957,6 @@ cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
|
||||||
tp.VariableFile = tg->GetProgressFileNameFull();
|
tp.VariableFile = tg->GetProgressFileNameFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
bool
|
|
||||||
cmGlobalUnixMakefileGenerator3::ProgressMapCompare
|
|
||||||
::operator()(cmTarget const* l, cmTarget const* r) const
|
|
||||||
{
|
|
||||||
// Order by target name.
|
|
||||||
if(int c = strcmp(l->GetName().c_str(), r->GetName().c_str()))
|
|
||||||
{
|
|
||||||
return c < 0;
|
|
||||||
}
|
|
||||||
// Order duplicate targets by binary directory.
|
|
||||||
return strcmp(l->GetMakefile()->GetCurrentOutputDirectory(),
|
|
||||||
r->GetMakefile()->GetCurrentOutputDirectory()) < 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
cmGlobalUnixMakefileGenerator3::TargetProgress
|
cmGlobalUnixMakefileGenerator3::TargetProgress
|
||||||
|
|
|
@ -185,10 +185,8 @@ protected:
|
||||||
std::vector<unsigned long> Marks;
|
std::vector<unsigned long> Marks;
|
||||||
void WriteProgressVariables(unsigned long total, unsigned long& current);
|
void WriteProgressVariables(unsigned long total, unsigned long& current);
|
||||||
};
|
};
|
||||||
struct ProgressMapCompare { bool operator()(cmTarget const*,
|
|
||||||
cmTarget const*) const; };
|
|
||||||
typedef std::map<cmTarget const*, TargetProgress,
|
typedef std::map<cmTarget const*, TargetProgress,
|
||||||
ProgressMapCompare> ProgressMapType;
|
cmStrictTargetComparison> ProgressMapType;
|
||||||
ProgressMapType ProgressMap;
|
ProgressMapType ProgressMap;
|
||||||
|
|
||||||
size_t CountProgressMarksInTarget(cmTarget const* target,
|
size_t CountProgressMarksInTarget(cmTarget const* target,
|
||||||
|
|
Loading…
Reference in New Issue