summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.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/cmExtraCodeBlocksGenerator.cxx
parentf528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5 (diff)
downloadCMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.zip
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.gz
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.bz2
Port to GetGeneratorTargets.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx39
1 files changed, 19 insertions, 20 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 3bc76fa..a71b1cb 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -319,12 +319,12 @@ void cmExtraCodeBlocksGenerator
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
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:
{
@@ -333,7 +333,7 @@ void cmExtraCodeBlocksGenerator
if (strcmp((*lg)->GetCurrentBinaryDirectory(),
(*lg)->GetBinaryDirectory())==0)
{
- this->AppendTarget(fout, ti->first, 0,
+ this->AppendTarget(fout, targetName, 0,
make.c_str(), *lg, compiler.c_str());
}
}
@@ -341,15 +341,16 @@ void cmExtraCodeBlocksGenerator
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, 0,
+ this->AppendTarget(fout, targetName, 0,
make.c_str(), *lg, compiler.c_str());
break;
case cmState::EXECUTABLE:
@@ -358,11 +359,10 @@ void cmExtraCodeBlocksGenerator
case cmState::MODULE_LIBRARY:
case cmState::OBJECT_LIBRARY:
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(&ti->second);
- this->AppendTarget(fout, ti->first, gt,
+ cmGeneratorTarget* gt = *ti;
+ this->AppendTarget(fout, targetName, gt,
make.c_str(), *lg, compiler.c_str());
- std::string fastTarget = ti->first;
+ std::string fastTarget = targetName;
fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, gt,
make.c_str(), *lg, compiler.c_str());
@@ -388,11 +388,11 @@ void cmExtraCodeBlocksGenerator
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())
+ switch((*ti)->GetType())
{
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
@@ -402,8 +402,7 @@ void cmExtraCodeBlocksGenerator
case cmState::UTILITY: // can have sources since 2.6.3
{
std::vector<cmSourceFile*> sources;
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(&ti->second);
+ cmGeneratorTarget* gt = *ti;
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
@@ -442,7 +441,7 @@ void cmExtraCodeBlocksGenerator
}
CbpUnit &cbpUnit = allFiles[fullPath];
- cbpUnit.Targets.push_back(&(ti->second));
+ cbpUnit.Targets.push_back((*ti)->Target);
}
}
default: // intended fallthrough