summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-21 17:51:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:53 (GMT)
commitf528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5 (patch)
tree60cb17dfb4aa34837b7009233630bbe978506b8f /Source
parenta6b7eb5bc8c304dab2102689eb09ec85c1e7f6be (diff)
downloadCMake-f528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5.zip
CMake-f528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5.tar.gz
CMake-f528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5.tar.bz2
Makefiles: Port progress marks to cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx12
-rw-r--r--Source/cmGeneratorTarget.h5
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h4
4 files changed, 22 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 3f600b2..fe6b446 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 4383288..544cf0e 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -673,6 +673,11 @@ public:
{
return this->MaxLanguageStandards;
}
+
+ struct StrictTargetComparison {
+ bool operator()(cmGeneratorTarget const* t1,
+ cmGeneratorTarget const* t2) const;
+ };
};
#endif
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 74d23a3..248701a 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -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();
}
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 5f39c79..0485eb8 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -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,