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";
|
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
|
struct cmGeneratorTarget::SourceFileFlags
|
||||||
cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
|
cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
|
||||||
|
@ -673,6 +673,11 @@ public:
|
|||||||
{
|
{
|
||||||
return this->MaxLanguageStandards;
|
return this->MaxLanguageStandards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct StrictTargetComparison {
|
||||||
|
bool operator()(cmGeneratorTarget const* t1,
|
||||||
|
cmGeneratorTarget const* t2) const;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -778,7 +778,7 @@ cmGlobalUnixMakefileGenerator3
|
|||||||
std::ostringstream progressArg;
|
std::ostringstream progressArg;
|
||||||
const char* sep = "";
|
const char* sep = "";
|
||||||
std::vector<unsigned long>& progFiles =
|
std::vector<unsigned long>& progFiles =
|
||||||
this->ProgressMap[gtarget->Target].Marks;
|
this->ProgressMap[gtarget].Marks;
|
||||||
for (std::vector<unsigned long>::iterator i = progFiles.begin();
|
for (std::vector<unsigned long>::iterator i = progFiles.begin();
|
||||||
i != progFiles.end(); ++i)
|
i != progFiles.end(); ++i)
|
||||||
{
|
{
|
||||||
@ -966,7 +966,7 @@ cmGlobalUnixMakefileGenerator3
|
|||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
if(emitted.insert(target).second)
|
if(emitted.insert(target).second)
|
||||||
{
|
{
|
||||||
count = this->ProgressMap[target->Target].Marks.size();
|
count = this->ProgressMap[target].Marks.size();
|
||||||
TargetDependSet const& depends = this->GetTargetDirectDepends(target);
|
TargetDependSet const& depends = this->GetTargetDirectDepends(target);
|
||||||
for(TargetDependSet::const_iterator di = depends.begin();
|
for(TargetDependSet::const_iterator di = depends.begin();
|
||||||
di != depends.end(); ++di)
|
di != depends.end(); ++di)
|
||||||
@ -1003,7 +1003,7 @@ void
|
|||||||
cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
|
cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
|
||||||
cmMakefileTargetGenerator* tg)
|
cmMakefileTargetGenerator* tg)
|
||||||
{
|
{
|
||||||
TargetProgress& tp = this->ProgressMap[tg->GetTarget()];
|
TargetProgress& tp = this->ProgressMap[tg->GetGeneratorTarget()];
|
||||||
tp.NumberOfActions = tg->GetNumberOfProgressActions();
|
tp.NumberOfActions = tg->GetNumberOfProgressActions();
|
||||||
tp.VariableFile = tg->GetProgressFileNameFull();
|
tp.VariableFile = tg->GetProgressFileNameFull();
|
||||||
}
|
}
|
||||||
|
@ -192,8 +192,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);
|
||||||
};
|
};
|
||||||
typedef std::map<cmTarget const*, TargetProgress,
|
typedef std::map<cmGeneratorTarget const*, TargetProgress,
|
||||||
cmStrictTargetComparison> ProgressMapType;
|
cmGeneratorTarget::StrictTargetComparison> ProgressMapType;
|
||||||
ProgressMapType ProgressMap;
|
ProgressMapType ProgressMap;
|
||||||
|
|
||||||
size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
|
size_t CountProgressMarksInTarget(cmGeneratorTarget const* target,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user