summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-18 15:06:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:53 (GMT)
commit67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95 (patch)
tree11419dddadbd492b9baef008e3e70eff5ae3e402 /Source/cmExtraSublimeTextGenerator.cxx
parentf528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5 (diff)
downloadCMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.zip
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.gz
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.bz2
Port to GetGeneratorTargets.
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index ac0202b..47822e8 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -162,11 +162,12 @@ void cmExtraSublimeTextGenerator::
lg!=lgs.end(); lg++)
{
cmMakefile* makefile=(*lg)->GetMakefile();
- cmTargets& targets=makefile->GetTargets();
- for (cmTargets::iterator ti = targets.begin();
+ std::vector<cmGeneratorTarget*> targets=(*lg)->GetGeneratorTargets();
+ for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ti++)
{
- switch(ti->second.GetType())
+ std::string targetName = (*ti)->GetName();
+ switch((*ti)->GetType())
{
case cmState::GLOBAL_TARGET:
{
@@ -175,7 +176,7 @@ void cmExtraSublimeTextGenerator::
if (strcmp((*lg)->GetCurrentBinaryDirectory(),
(*lg)->GetBinaryDirectory())==0)
{
- this->AppendTarget(fout, ti->first, *lg, 0,
+ this->AppendTarget(fout, targetName, *lg, 0,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
}
@@ -184,15 +185,16 @@ void cmExtraSublimeTextGenerator::
case cmState::UTILITY:
// Add all utility targets, except the Nightly/Continuous/
// Experimental-"sub"targets as e.g. NightlyStart
- if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
- || ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
- || ((ti->first.find("Experimental")==0)
- && (ti->first!="Experimental")))
+ if (((targetName.find("Nightly")==0) &&(targetName!="Nightly"))
+ || ((targetName.find("Continuous")==0)
+ &&(targetName!="Continuous"))
+ || ((targetName.find("Experimental")==0)
+ && (targetName!="Experimental")))
{
break;
}
- this->AppendTarget(fout, ti->first, *lg, 0,
+ this->AppendTarget(fout, targetName, *lg, 0,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
break;
@@ -202,12 +204,12 @@ void cmExtraSublimeTextGenerator::
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
- this->AppendTarget(fout, ti->first, *lg, &ti->second,
+ this->AppendTarget(fout, targetName, *lg, (*ti)->Target,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
- std::string fastTarget = ti->first;
+ std::string fastTarget = targetName;
fastTarget += "/fast";
- this->AppendTarget(fout, fastTarget, *lg, &ti->second,
+ this->AppendTarget(fout, fastTarget, *lg, (*ti)->Target,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
}