Makefiles: Port progress marks to cmGeneratorTarget.
This commit is contained in:
parent
a6b7eb5bc8
commit
f528e6bcb9
|
@ -3607,6 +3607,18 @@ std::string cmGeneratorTarget::GetPDBName(const std::string& config) const
|
|||
return prefix+base+".pdb";
|
||||
}
|
||||
|
||||
bool cmGeneratorTarget::StrictTargetComparison::operator()(
|
||||
cmGeneratorTarget const* t1, cmGeneratorTarget const* t2) const
|
||||
{
|
||||
int nameResult = strcmp(t1->GetName().c_str(), t2->GetName().c_str());
|
||||
if (nameResult == 0)
|
||||
{
|
||||
return strcmp(t1->GetLocalGenerator()->GetCurrentBinaryDirectory(),
|
||||
t2->GetLocalGenerator()->GetCurrentBinaryDirectory()) < 0;
|
||||
}
|
||||
return nameResult < 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
struct cmGeneratorTarget::SourceFileFlags
|
||||
cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
|
||||
|
|
|
@ -673,6 +673,11 @@ public:
|
|||
{
|
||||
return this->MaxLanguageStandards;
|
||||
}
|
||||
|
||||
struct StrictTargetComparison {
|
||||
bool operator()(cmGeneratorTarget const* t1,
|
||||
cmGeneratorTarget const* t2) const;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -778,7 +778,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
std::ostringstream progressArg;
|
||||
const char* sep = "";
|
||||
std::vector<unsigned long>& progFiles =
|
||||
this->ProgressMap[gtarget->Target].Marks;
|
||||
this->ProgressMap[gtarget].Marks;
|
||||
for (std::vector<unsigned long>::iterator i = progFiles.begin();
|
||||
i != progFiles.end(); ++i)
|
||||
{
|
||||
|
@ -966,7 +966,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
size_t count = 0;
|
||||
if(emitted.insert(target).second)
|
||||
{
|
||||
count = this->ProgressMap[target->Target].Marks.size();
|
||||
count = this->ProgressMap[target].Marks.size();
|
||||
TargetDependSet const& depends = this->GetTargetDirectDepends(target);
|
||||
for(TargetDependSet::const_iterator di = depends.begin();
|
||||
di != depends.end(); ++di)
|
||||
|
@ -1003,7 +1003,7 @@ void
|
|||
cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
|
||||
cmMakefileTargetGenerator* tg)
|
||||
{
|
||||
TargetProgress& tp = this->ProgressMap[tg->GetTarget()];
|
||||
TargetProgress& tp = this->ProgressMap[tg->GetGeneratorTarget()];
|
||||
tp.NumberOfActions = tg->GetNumberOfProgressActions();
|
||||
tp.VariableFile = tg->GetProgressFileNameFull();
|
||||
}
|
||||
|
|
|
@ -192,8 +192,8 @@ protected:
|
|||
std::vector<unsigned long> Marks;
|
||||
void WriteProgressVariables(unsigned long total, unsigned long& current);
|
||||
};
|
||||
typedef std::map<cmTarget const*, TargetProgress,
|
||||
cmStrictTargetComparison> ProgressMapType;
|
||||
typedef std::map<cmGeneratorTarget const*, TargetProgress,
|
||||
cmGeneratorTarget::StrictTargetComparison> ProgressMapType;
|
||||
ProgressMapType ProgressMap;
|
||||
|
||||
size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
|
||||
|
|
Loading…
Reference in New Issue