summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3ed612d..3b858af 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -950,7 +950,7 @@ void cmGlobalGenerator::ClearEnabledLanguages()
}
bool cmGlobalGenerator::IsDependedOn(const char* project,
- cmTarget* targetIn)
+ cmTarget const* targetIn)
{
// Get all local gens for this project
std::vector<cmLocalGenerator*>* gens = &this->ProjectMap[project];
@@ -1242,8 +1242,8 @@ bool cmGlobalGenerator::ComputeTargetDepends()
{
return false;
}
- std::vector<cmTarget*> const& targets = ctd.GetTargets();
- for(std::vector<cmTarget*>::const_iterator ti = targets.begin();
+ std::vector<cmTarget const*> const& targets = ctd.GetTargets();
+ for(std::vector<cmTarget const*>::const_iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]);
@@ -1306,7 +1306,7 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens)
cmQtAutoGenerators autogen;
if(autogen.InitializeAutogenTarget(&target))
{
- autogens.push_back(std::make_pair(autogen, &target));
+ autogens.push_back(AutogensType::value_type(autogen, &target));
}
}
}
@@ -1407,6 +1407,10 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
for(cmGeneratorTargetsType::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
+ if (ti->second->Target->IsImported())
+ {
+ continue;
+ }
cmGeneratorTarget* gt = ti->second;
gt->ClassifySources();
gt->LookupObjectLibraries();
@@ -1460,7 +1464,8 @@ void cmGlobalGenerator::ClearGeneratorMembers()
}
//----------------------------------------------------------------------------
-cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget* t) const
+cmGeneratorTarget*
+cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
{
cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t);
if(ti == this->GeneratorTargets.end())
@@ -1982,7 +1987,7 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
clg = clg->GetParent())
{
// This local generator includes the target.
- std::set<cmTarget*>& targetSet =
+ std::set<cmTarget const*>& targetSet =
this->LocalGeneratorToTargetMap[clg];
targetSet.insert(&target);
@@ -1993,7 +1998,8 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
for(TargetDependSet::const_iterator ti = tgtdeps.begin();
ti != tgtdeps.end(); ++ti)
{
- targetSet.insert(*ti);
+ cmTarget const* ttt = *ti;
+ targetSet.insert(ttt);
}
}
}
@@ -2506,7 +2512,7 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*,
//----------------------------------------------------------------------------
cmGlobalGenerator::TargetDependSet const&
-cmGlobalGenerator::GetTargetDirectDepends(cmTarget & target)
+cmGlobalGenerator::GetTargetDirectDepends(cmTarget const& target)
{
return this->TargetDependencies[&target];
}
@@ -2628,7 +2634,7 @@ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target)
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
+void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
TargetDependSet& projectTargets)
{
// add the target itself
@@ -2639,7 +2645,7 @@ void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
TargetDependSet const& ts = this->GetTargetDirectDepends(*target);
for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i)
{
- cmTarget* dtarget = *i;
+ cmTarget const* dtarget = *i;
this->AddTargetDepends(dtarget, projectTargets);
}
}