summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx90
1 files changed, 28 insertions, 62 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 2126c71..848028f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -86,6 +86,13 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
this->TryCompileOuterMakefile = 0;
this->ConfigureDoneCMP0026AndCMP0024 = false;
+
+ cm->GetState()->SetMinGWMake(false);
+ cm->GetState()->SetMSYSShell(false);
+ cm->GetState()->SetNMake(false);
+ cm->GetState()->SetWatcomWMake(false);
+ cm->GetState()->SetWindowsShell(false);
+ cm->GetState()->SetWindowsVSIDE(false);
}
cmGlobalGenerator::~cmGlobalGenerator()
@@ -1649,6 +1656,8 @@ void cmGlobalGenerator::ClearGeneratorMembers()
this->ExportSets.clear();
this->TargetDependencies.clear();
+ this->TargetSearchIndex.clear();
+ this->GeneratorTargetSearchIndex.clear();
this->ProjectMap.clear();
this->RuleHashes.clear();
this->DirectoryContentMap.clear();
@@ -1850,7 +1859,7 @@ int cmGlobalGenerator::Build(
!makeCommand.empty() && cmSystemTools::LowerCase(
cmSystemTools::GetFilenameName(makeCommand[0])) == "vcexpress.exe")
{
- outputflag = cmSystemTools::OUTPUT_NORMAL;
+ outputflag = cmSystemTools::OUTPUT_FORWARD;
}
// should we do a clean first?
@@ -2177,75 +2186,40 @@ bool cmGlobalGenerator::IsAlias(const std::string& name) const
return this->AliasTargets.find(name) != this->AliasTargets.end();
}
-cmTarget* cmGlobalGenerator::FindTargetImpl(std::string const& name) const
+void cmGlobalGenerator::IndexTarget(cmTarget* t)
{
- for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
+ if (!t->IsImported() || t->IsImportedGloballyVisible())
{
- cmTargets& tgts = this->Makefiles[i]->GetTargets();
- for (cmTargets::iterator it = tgts.begin(); it != tgts.end(); ++it)
- {
- if (it->second.GetName() == name)
- {
- return &it->second;
- }
- }
+ this->TargetSearchIndex[t->GetName()] = t;
}
- return 0;
}
-cmGeneratorTarget*
-cmGlobalGenerator::FindGeneratorTargetImpl(std::string const& name) const
+void cmGlobalGenerator::IndexGeneratorTarget(cmGeneratorTarget* gt)
{
- for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+ if (!gt->IsImported() || gt->IsImportedGloballyVisible())
{
- std::vector<cmGeneratorTarget*> tgts =
- this->LocalGenerators[i]->GetGeneratorTargets();
- for (std::vector<cmGeneratorTarget*>::iterator it = tgts.begin();
- it != tgts.end(); ++it)
- {
- if ((*it)->GetName() == name)
- {
- return *it;
- }
- }
+ this->GeneratorTargetSearchIndex[gt->GetName()] = gt;
}
- return 0;
}
-cmTarget*
-cmGlobalGenerator::FindImportedTargetImpl(std::string const& name) const
+cmTarget* cmGlobalGenerator::FindTargetImpl(std::string const& name) const
{
- for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
+ TargetMap::const_iterator i = this->TargetSearchIndex.find(name);
+ if (i != this->TargetSearchIndex.end())
{
- std::vector<cmTarget*> tgts =
- this->Makefiles[i]->GetOwnedImportedTargets();
- for (std::vector<cmTarget*>::iterator it = tgts.begin();
- it != tgts.end(); ++it)
- {
- if ((*it)->GetName() == name && (*it)->IsImportedGloballyVisible())
- {
- return *it;
- }
- }
+ return i->second;
}
return 0;
}
-cmGeneratorTarget* cmGlobalGenerator::FindImportedGeneratorTargetImpl(
- std::string const& name) const
+cmGeneratorTarget*
+cmGlobalGenerator::FindGeneratorTargetImpl(std::string const& name) const
{
- for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
+ GeneratorTargetMap::const_iterator i =
+ this->GeneratorTargetSearchIndex.find(name);
+ if (i != this->GeneratorTargetSearchIndex.end())
{
- std::vector<cmGeneratorTarget*> tgts =
- this->LocalGenerators[i]->GetImportedGeneratorTargets();
- for (std::vector<cmGeneratorTarget*>::iterator it = tgts.begin();
- it != tgts.end(); ++it)
- {
- if ((*it)->IsImportedGloballyVisible() && (*it)->GetName() == name)
- {
- return *it;
- }
- }
+ return i->second;
}
return 0;
}
@@ -2264,11 +2238,7 @@ cmGlobalGenerator::FindTarget(const std::string& name,
return this->FindTargetImpl(ai->second);
}
}
- if (cmTarget* tgt = this->FindTargetImpl(name))
- {
- return tgt;
- }
- return this->FindImportedTargetImpl(name);
+ return this->FindTargetImpl(name);
}
cmGeneratorTarget*
@@ -2280,11 +2250,7 @@ cmGlobalGenerator::FindGeneratorTarget(const std::string& name) const
{
return this->FindGeneratorTargetImpl(ai->second);
}
- if (cmGeneratorTarget* tgt = this->FindGeneratorTargetImpl(name))
- {
- return tgt;
- }
- return this->FindImportedGeneratorTargetImpl(name);
+ return this->FindGeneratorTargetImpl(name);
}
//----------------------------------------------------------------------------