diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-18 14:53:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-21 21:21:01 (GMT) |
commit | a8c0fbcc194bca6986492278e705ff301f283378 (patch) | |
tree | 6eca4050b77be5106654aa50a9ad60a499d2419a /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | e4b7d5afde91efafb59749a0a513732a089a6f0a (diff) | |
download | CMake-a8c0fbcc194bca6986492278e705ff301f283378.zip CMake-a8c0fbcc194bca6986492278e705ff301f283378.tar.gz CMake-a8c0fbcc194bca6986492278e705ff301f283378.tar.bz2 |
cmLocalGenerator: Store a vector of generator targets.
Not a map from cmTarget to cmGeneratorTarget.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5485da4..07f763b 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -113,18 +113,18 @@ void cmLocalUnixMakefileGenerator3::Generate() this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES"); // Generate the rule files for each target. - cmGeneratorTargetsType targets = this->GetGeneratorTargets(); + std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets(); cmGlobalUnixMakefileGenerator3* gg = static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); - for(cmGeneratorTargetsType::iterator t = targets.begin(); + for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin(); t != targets.end(); ++t) { - if (t->second->GetType() == cmState::INTERFACE_LIBRARY) + if ((*t)->GetType() == cmState::INTERFACE_LIBRARY) { continue; } cmsys::auto_ptr<cmMakefileTargetGenerator> tg( - cmMakefileTargetGenerator::New(t->second)); + cmMakefileTargetGenerator::New(*t)); if (tg.get()) { tg->WriteRuleFiles(); @@ -174,11 +174,11 @@ void cmLocalUnixMakefileGenerator3:: GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles) { std::set<std::string> emitted; - cmGeneratorTargetsType targets = this->GetGeneratorTargets(); - for(cmGeneratorTargetsType::iterator ti = targets.begin(); + std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets(); + for(std::vector<cmGeneratorTarget*>::iterator ti = targets.begin(); ti != targets.end(); ++ti) { - cmGeneratorTarget* gt = ti->second; + cmGeneratorTarget* gt = *ti; if (gt->GetType() == cmState::INTERFACE_LIBRARY) { continue; @@ -417,22 +417,22 @@ void cmLocalUnixMakefileGenerator3 // for each target we just provide a rule to cd up to the top and do a make // on the target - cmGeneratorTargetsType targets = this->GetGeneratorTargets(); + std::vector<cmGeneratorTarget*> targets = this->GetGeneratorTargets(); std::string localName; - for(cmGeneratorTargetsType::iterator t = targets.begin(); + for(std::vector<cmGeneratorTarget*>::iterator t = targets.begin(); t != targets.end(); ++t) { - if((t->second->GetType() == cmState::EXECUTABLE) || - (t->second->GetType() == cmState::STATIC_LIBRARY) || - (t->second->GetType() == cmState::SHARED_LIBRARY) || - (t->second->GetType() == cmState::MODULE_LIBRARY) || - (t->second->GetType() == cmState::OBJECT_LIBRARY) || - (t->second->GetType() == cmState::UTILITY)) + if(((*t)->GetType() == cmState::EXECUTABLE) || + ((*t)->GetType() == cmState::STATIC_LIBRARY) || + ((*t)->GetType() == cmState::SHARED_LIBRARY) || + ((*t)->GetType() == cmState::MODULE_LIBRARY) || + ((*t)->GetType() == cmState::OBJECT_LIBRARY) || + ((*t)->GetType() == cmState::UTILITY)) { - emitted.insert(t->second->GetName()); + emitted.insert((*t)->GetName()); // for subdirs add a rule to build this specific target by name. - localName = this->GetRelativeTargetDirectory(t->second); + localName = this->GetRelativeTargetDirectory(*t); localName += "/rule"; commands.clear(); depends.clear(); @@ -449,23 +449,23 @@ void cmLocalUnixMakefileGenerator3 localName, depends, commands, true); // Add a target with the canonical name (no prefix, suffix or path). - if(localName != t->second->GetName()) + if(localName != (*t)->GetName()) { commands.clear(); depends.push_back(localName); this->WriteMakeRule(ruleFileStream, "Convenience name for target.", - t->second->GetName(), depends, commands, true); + (*t)->GetName(), depends, commands, true); } // Add a fast rule to build the target std::string makefileName = - this->GetRelativeTargetDirectory(t->second); + this->GetRelativeTargetDirectory(*t); makefileName += "/build.make"; // make sure the makefile name is suitable for a makefile std::string makeTargetName = - this->GetRelativeTargetDirectory(t->second); + this->GetRelativeTargetDirectory(*t); makeTargetName += "/build"; - localName = t->second->GetName(); + localName = (*t)->GetName(); localName += "/fast"; depends.clear(); commands.clear(); @@ -479,11 +479,11 @@ void cmLocalUnixMakefileGenerator3 // Add a local name for the rule to relink the target before // installation. - if(t->second->NeedRelinkBeforeInstall(this->ConfigName)) + if((*t)->NeedRelinkBeforeInstall(this->ConfigName)) { - makeTargetName = this->GetRelativeTargetDirectory(t->second); + makeTargetName = this->GetRelativeTargetDirectory(*t); makeTargetName += "/preinstall"; - localName = t->second->GetName(); + localName = (*t)->GetName(); localName += "/preinstall"; depends.clear(); commands.clear(); |